nginx uwsgi connection timeout
mdounin at mdounin.ru
Mon Nov 10 15:16:03 UTC 2014
On Fri, Nov 07, 2014 at 05:52:31PM -0500, jpherbst wrote:
> I have nginx 1.6.1 setup in front of uwsgi 2.0.7 using uwsgi_pass, which has
> been working very well for me except for one request. When I make the
> failing request uwsgi processes the request and returns the response in less
> than a second, but nginx just sits there with an open connection to uwsgi
> eventually timing out after 60 seconds as if uwsgi did not send back a
> complete request. I have many other pages hosted on this server all of
> which work just fine, both post and get requests. The one difference I have
> noticed about this request is that the response is very small, 14 bytes of
> json. I have tried using both chunked and not chunked (with content-length
> header) encoding, they both yield the same result. I tried adding
> "uwsgi_buffering off;" to my configuration, this allowed the request to
> complete, but the next request hangs because nginx doesn't think the
> previous request is finished and I only have one uwsgi worker.
> Does anyone have any ideas about what could cause this?
In the uwsgi protocol, end of a response is signalled by closing a
connection. Are connections properly closed by your backend?
See also here for some generic debugging hints:
More information about the nginx