简体   繁体   中英

PHP-FPM: pm.process_idle_timeout vs php_admin_value[max_execution_time]

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 (ie 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM