php process timeout

This commit is contained in:
Bob Mottram 2017-07-10 18:30:09 +01:00
parent d96d5bcf23
commit e941516024
1 changed files with 6 additions and 0 deletions

View File

@ -584,6 +584,12 @@ function install_web_server {
echo 'pm.max_spare_servers = 5' >> /etc/php/7.0/fpm/php-fpm.conf
echo 'pm.max_requests = 10' >> /etc/php/7.0/fpm/php-fpm.conf
fi
if ! grep -q "request_terminate_timeout" /etc/php/7.0/fpm/php-fpm.conf; then
echo 'request_terminate_timeout = 30' >> /etc/php/7.0/fpm/php-fpm.conf
else
sed -i 's|request_terminate_timeout =.*|request_terminate_timeout = 30|g' >> /etc/php/7.0/fpm/php-fpm.conf
fi
sed -i 's|max_execution_time =.*|max_execution_time = 30|g' /etc/php/7.0/fpm/php.ini
if [ ! -d /etc/nginx ]; then
echo $"ERROR: nginx does not appear to have installed. $CHECK_MESSAGE"