[英]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? 我在我的Apache站点配置中使用-idle-timeout 120
将FCGI空闲超时值设置为120,以确保Apache在我的php脚本执行完毕之前没有超时,但现在我想知道设置之间的区别是什么在php-fpm .conf文件中php_admin_value[max_execution_time] = 120
和pm.process_idle_timeout = 120s
?
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. 基于文件php-fpm.conf.default
: pm.process_idle_timeout
与脚本执行无关。 It defines the time a spawned FPM child has to be idle (ie not handle a request) before it will be killed. 它定义了生成的FPM子项在被杀死之前必须处于空闲状态(即不处理请求)的时间。 This does not affect script execution in any way (not even sleep()). 这不会以任何方式影响脚本执行(甚至不是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. PHP:运行时配置 :PHP INI设置max_execution_time
定义脚本执行停止后的最长处理时间(CPU时间)(以秒为单位)。 Note: Last time I checked (2 years ago), this did not apply to Windows where the elapsed real time counts. 注意:上次我检查(2年前)时,这不适用于经过实时计算的Windows。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.