php请求超时过高导致系统负载高的优化方法?
【描述】
request_slowlog_timeout = 1s 此值为超过一秒的php则记录到slow.log中
request_terminate_timeout = 30s 将执行时间太长的进程直接终止,不建议太长,易造成php程序僵死
◆ 操作方法
cd /opt/php5/etc/
将请求超时的时间改小点就可以了。
vi php-fpm.conf
cript execution for some reason
"0s" means "off"
<value name="request_terminate_timeout">60s</value>
The timeout (in seconds) for serving of single request after which a php backtrace will be dumped to slow.log file
"0s" means "off"
<value name="request_slowlog_timeout">1s</value>
request_slowlog_timeout = 1s 此值为超过一秒的php则记录到slow.log中
request_terminate_timeout = 30s 将执行时间太长的进程直接终止,不建议太长,易造成php程序僵死
◆ 操作方法
cd /opt/php5/etc/
将请求超时的时间改小点就可以了。
vi php-fpm.conf
cript execution for some reason
"0s" means "off"
<value name="request_terminate_timeout">60s</value>
The timeout (in seconds) for serving of single request after which a php backtrace will be dumped to slow.log file
"0s" means "off"
<value name="request_slowlog_timeout">1s</value>
声明:该文观点仅代表作者本人,牛骨文系教育信息发布平台,牛骨文仅提供信息存储空间服务。