Nginx报以下错误
2014/09/23 10:10:23 [error] 27617#0: *111642 readv() failed (104: Connection reset by peer) while reading upstream, client: xxxxxx, server: xxxxx, request: "POST /disc_prototypes.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "xxxxx", referrer: "http://xxxxxx/disc_prototypes.php?parent_discoveryid=24117&form=Create+item+prototype"
解决办法
这个是由于提交页面后PHP-FPM处理时间过长造成的。需要在php-fpm.conf中设置request_terminate_timeout和php.ini中设置max_execution_time两个参数的值
设置单个PHP脚本最大执行时间
max_execution_time = 300s
设置PHP-FPM工作进程处理单个请求的超时时间
request_terminate_timeout = 600s
重新加载PHP-FPM后就可以保存新增的item了
时间: 2024-10-05 00:59:51