Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does request_terminate_timeout overwrite max_execution_time?

Tags:

php

Does the request_terminate_timeout in the PHP-FPM Pool Definitions overwrite the max_execution_time in php.ini file?

like image 869
Gajus Avatar asked Aug 13 '13 08:08

Gajus


People also ask

What is the best value for max_execution_time in PHP?

max_execution_time is set to 60 which is too low. A minimum execution time of 150 seconds is recommended to give the migration process the best chance of succeeding.

What is max_execution_time in PHP INI?

max_execution_time int. This sets the maximum time in seconds a script is allowed to run before it is terminated by the parser. This helps prevent poorly written scripts from tying up the server. The default setting is 30 . When running PHP from the command line the default setting is 0 .

How to increase max_ execution_ time in Nginx?

How to increase max execution time in NGINX? Open your nginx. conf file and add the following directive within the http block: fastcgi_read_timeout 60s; This should be greater than or equal to the value set in max_execution_time .

Where is PHP FPM conf?

The configuration file is /etc/php- fpm.


1 Answers

Apparently the're both doing the same thing at different levels. max_execution_time is honored by PHP itself and request_terminate_timeout is handled by the FPM process control mechanism. So whichever is set to the lowest value will kick in first. Also Apache has the idle-timeout parameter that it observes and will give up on the PHP process after that time.

Also

maximum execution time is not affected by system calls, stream operations etc.

so you need to take that into account as well.

like image 54
cosmin Avatar answered Nov 15 '22 07:11

cosmin