PHP-FPM And Timeout

CheGuevara

Verified User
Joined
Nov 23, 2009
Messages
26
Hi everyone,

Been trying to figure this one out myself, but it's just not happening. Decided to switch to php-fpm, all is good and well, but I got scripts that need to run for some time, yet there's a timeout limit somewhere thats set to 30 seconds, but I can't figure out where??

script '.../index.php' (request: "GET /index.php") execution timed out (38.710172 sec), terminating is in log file.

Any idea?
 
It is request_terminate_timeout setting in /usr/local/php5?/etc/php-fpm.conf. Don't forget to restart the php-fpm service after the changes.
 
It is request_terminate_timeout setting in /usr/local/php5?/etc/php-fpm.conf. Don't forget to restart the php-fpm service after the changes.

Thanks, but I wish it was that simple

request_terminate_timeout = 0s (which is disabled, according to docs)
request_terminate_timeout = 3000 didn't work either.
 
Been trying to figure this one out myself, but it's just not happening. Decided to switch to php-fpm, all is good and well, but I got scripts that need to run for some time, yet there's a timeout limit somewhere thats set to 30 seconds, but I can't figure out where??

Are you using NGINX or Apache?

Also you might want to use ignore_user_abort() if you need your PHP script to be running regardless of a closed/dropped connection.

Related: http://php.net/manual/en/function.ignore-user-abort.php
 
Back
Top