返回顶部

收藏

nginx报错 "readv() failed (104: Connection reset by peer)" 解决方法

更多

nginx错误日志中出现"Connection reset by peer" :

[error] readv() failed (104: Connection reset by peer) while reading upstream, client: x.x.x.x, server: host.tld, request: "POST /script.php, ...

出现这种情况可能是因为php的配置参数导致php进程意外终止了:

max_input_time = ...
max_execution_time = ...

建议增大这两个参数的值。另外PHP-FPM有一个request_terminate_timeout的参数,这个参数可以设定当php进程终止时请求的等待时长。你可以在php-fpm.conf中将这个参数的值设定为600:

request_terminate_timeout = 600

标签:nginx,php,配置

收藏

0人收藏

支持

0

反对

0

发表评论