How to increase PHP-FPM Idle Timeout

By default PHP-FPM sets the script execution (idle) timeout to 30 seconds. In some cases, 30 seconds is not enough. You can bump up the timeout by editing the file /etc/apache2/conf.d/php5-fpm and change this line:

FastCgiExternalServer /fcgi-bin-php5-fpm -socket /var/run/php5-fpm.sock -pass-header Authorization`

to this:

FastCgiExternalServer /fcgi-bin-php5-fpm -socket /var/run/php5-fpm.sock -idle-timeout 250 -pass-header Authorization

Reload PHP-FPM after modifying: /etc/init.d/php5-fpm

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s