How to fix "readv() failed (104: Connection reset by peer)" error in Nginx
"Connection reset by peer" error in Nginx:
[error] readv() failed (104: Connection reset by peer) while reading upstream, client: x.x.x.x, server: host.tld, request: "POST /script.php, ...
may occur because the following PHP parameters can cause the PHP process to end unexpectedly:
max_input_time = ... max_execution_time = ...
It's suggested to increase these parameters.
Also if you use PHP-FPM there is a parameter request_terminate_timeout which determines the timeout for serving one request after which the process is terminated. In php-fpm.conf cnahge the value of request_terminate_timeout parameter to 600 seconds:
request_terminate_timeout = 600
Got a comment?
All Rights Reserved.