readv() failed (104: Connection reset by peer) while reading upstream
[error] 1528#1528: *599 readv() failed (104: Connection reset by peer) while reading upstream, client: 10.65.11.207, server: localhost, request: "POST /apis/v2/system/upgrade/upload HTTP/1.1", upstream: "http://127.0.0.1:8085/apis/v2/system/upgrade/upload", host: "10.65.11.219", referrer: "https://10.65.11.219/admin/update"
Understanding:
This message "(XXX: Connection reset by peer) while reading upstream" appears when the server backend initiates the disconnect. It is not the client that failed. Usually the server will have responded to the request with a more specific error message to help debug. In my case the response which could be viewed with Google Chrome Network Inspector was :
HTTP 400 Bad Request
"{"code":"BadRequest","message":"maxFileSize exceeded, received 209763252 bytes of file data"}"
Solution:
change
http_server.use(restify.plugins.bodyParser();
to
http_server.use(restify.plugins.bodyParser({maxFileSize: 5 * 1024 * 1024 * 1024})); // 5 GB
Recent Comments