A
A
Andrey Dr2017-07-17 15:05:51
Nginx
Andrey Dr, 2017-07-17 15:05:51

Why is the nginx error: *20 readv() failed (104: Connection reset by peer) while reading upstream?

Good afternoon.
Help me understand
The server gives the following error:
2017/07/14 11:09:11 [error]
10362#10362: *20 readv() failed (104: Connection reset by peer) while reading upstream,
client: 99.99.99.99, server: site.com, request: "POST /upload HTTP/1.1",
upstream: "http://127.0.0.1:3000/upload", host: "site.com", referrer: " site.com/cabinet "
This happens when trying to upload a file to the server.
I upload using node.js+Express+Multer
As a result, the file is saved on the server cut to 63Kb, and the images contain only the top of the picture.
On a local computer it works fine, on a hosting there is such a problem.
On hosting, nginx proxies requests to the nodejs application.
I went in for the sake of checking directly, bypassing nginx, by IP address, everything was perfectly saved.
Learned from the hoster the config parameters
client_body_buffer_size 256k
client_max_body_size = 256Mb

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question