Change php to static processes
This commit is contained in:
parent
00a4467d27
commit
fdef7c93d7
|
@ -577,11 +577,12 @@ function install_web_server {
|
||||||
sed -i 's|process_control_timeout.*|process_control_timeout = 10s|g' /etc/php/7.0/fpm/php-fpm.conf
|
sed -i 's|process_control_timeout.*|process_control_timeout = 10s|g' /etc/php/7.0/fpm/php-fpm.conf
|
||||||
|
|
||||||
if ! grep -q "pm.max_children" /etc/php/7.0/fpm/php-fpm.conf; then
|
if ! grep -q "pm.max_children" /etc/php/7.0/fpm/php-fpm.conf; then
|
||||||
|
echo 'pm = static' >> /etc/php/7.0/fpm/php-fpm.conf
|
||||||
echo 'pm.max_children = 10' >> /etc/php/7.0/fpm/php-fpm.conf
|
echo 'pm.max_children = 10' >> /etc/php/7.0/fpm/php-fpm.conf
|
||||||
echo 'pm.start_servers = 2' >> /etc/php/7.0/fpm/php-fpm.conf
|
echo 'pm.start_servers = 2' >> /etc/php/7.0/fpm/php-fpm.conf
|
||||||
echo 'pm.min_spare_servers = 2' >> /etc/php/7.0/fpm/php-fpm.conf
|
echo 'pm.min_spare_servers = 2' >> /etc/php/7.0/fpm/php-fpm.conf
|
||||||
echo 'pm.max_spare_servers = 5' >> /etc/php/7.0/fpm/php-fpm.conf
|
echo 'pm.max_spare_servers = 5' >> /etc/php/7.0/fpm/php-fpm.conf
|
||||||
echo 'pm.max_requests = 50' >> /etc/php/7.0/fpm/php-fpm.conf
|
echo 'pm.max_requests = 10' >> /etc/php/7.0/fpm/php-fpm.conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -d /etc/nginx ]; then
|
if [ ! -d /etc/nginx ]; then
|
||||||
|
|
Loading…
Reference in New Issue