File upload with a 500 response
mdounin at mdounin.ru
Mon Jun 21 16:09:19 MSD 2010
On Fri, Jun 18, 2010 at 10:25:10AM -0400, woodsmar wrote:
> I tried the patch but unfortunately that didn't work as I still get the
> same behaviour. With debugging turned on the following is an excerpt
> from the error log:
> 2010/06/18 13:16:48 [debug] 30676#0: *1 readv: 1:3642
> 2010/06/18 13:16:48 [error] 30676#0: *1 readv() failed (104: Connection
> reset by peer) while reading upstream, client: 1
> 220.127.116.11, server: myserver.com, request: "POST /some/url HTTP/1.1",
> upstream: "http://some/other/url", host: "127.0.0.1"
Backend reseted connection instead of closing it, that's the
reason why you don't see reply.
In your particular case nginx actually got full reply but
discarded body as it got error from backend before it was able to
send it. This theoretically may be handled gracefully (and I even
posted patches for this a while ago). But note that with reset
there is a good chance that nginx won't see data at all as they
will be discarded in socket buffer by OS.
More information about the nginx