Welcome! Log In Create A New Profile

Advanced

php5-fpm + nginx control timeouts

Posted by Sandro 
Sandro
php5-fpm + nginx control timeouts
May 22, 2012 04:16PM
Hello,
I'm used to develop on Windows with Apache/mod_php where
max_execution_time always comes first and if I change it to 0 via
ini_set in the file I can run scripts indefinitely.

Now with ubuntu + php5-fpm + nginx things changed.
I don't know why but whether I set max_execution time in php.ini or
with ini_set or in the pool config with php_admin_value the setting is
never considered. What controls everything is fast_cgi's

fastcgi_send_timeout 50;
fastcgi_read_timeout 50;

and process_request_timeout in php pool that works too.

My question is not "how to stop php scripts" because as said above
there are alternative ways but rather "why is that value is ignored??"
anything else is still considered like display_error. Second, does
this mean that in a configuration with a webserver+fast cgi it's
impossible to run scripts (via HTTP requests of course) with no limits
since the backend timeout will always kick in?
Miha Vrhovnik
Re: php5-fpm + nginx control timeouts
May 25, 2012 10:26AM
Well you don0t want the processes that are returning a web content to the
users busy by doing whatever they are doing for extended periods of time.
If you do have such requests, then use workers and return to the user as
soon as possible.

On Tuesday, May 22, 2012 9:20:53 PM UTC+2, Sandro wrote:
>
> Hello,
> I'm used to develop on Windows with Apache/mod_php where
> max_execution_time always comes first and if I change it to 0 via
> ini_set in the file I can run scripts indefinitely.
>
> Now with ubuntu + php5-fpm + nginx things changed.
> I don't know why but whether I set max_execution time in php.ini or
> with ini_set or in the pool config with php_admin_value the setting is
> never considered. What controls everything is fast_cgi's
>
> fastcgi_send_timeout 50;
> fastcgi_read_timeout 50;
>
> and process_request_timeout in php pool that works too.
>
> My question is not "how to stop php scripts" because as said above
> there are alternative ways but rather "why is that value is ignored??"
> anything else is still considered like display_error. Second, does
> this mean that in a configuration with a webserver+fast cgi it's
> impossible to run scripts (via HTTP requests of course) with no limits
> since the backend timeout will always kick in?
>
>
>
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 67
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready