I have set the FCGI idle timeout value to 120 with -idle-timeout 120
in my Apache site configuration to make sure Apache doesn't time out before my php scripts are finished executing, but now I'm wondering what the difference is between setting php_admin_value[max_execution_time] = 120
and pm.process_idle_timeout = 120s
in a php-fpm .conf file?
Does one override the other? Is there a difference? Do I need to set both if I want to make sure my scripts don't time out before the length of time I specify?
Any explanation or reference would be helpful
Based on the comments from the file php-fpm.conf.default
: pm.process_idle_timeout
has nothing to do with script execution. It defines the time a spawned FPM child has to be idle (i.e. not handle a request) before it will be killed. This does not affect script execution in any way (not even sleep()).
PHP: Runtime Configuration:
The PHP INI setting max_execution_time
defines the maximum process time (CPU time) in seconds after which script execution will be halted.
Note: Last time I checked (2 years ago), this did not apply to Windows where the elapsed real time counts.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With