I've found a work around by setting uwsgi_buffering to off in nginx. Also I've spotted that with buffering enabled this additional error appears in nginx error log:
2013/01/13 15:47:47 [error] 1321#0: *52 upstream timed out (110: Connection timed out) while reading upstream, client: 127.0.0.1, server: , request: "GET /v1/table?url=http://localhost:8890/static/table.htm l HTTP/1.1", upstream: "uwsgi://unix:///tmp/uwsgi.sock:", host: "localhost:8890" May it be the case that I need to do something special in my flask app regarding this? Zaar On Sun, Jan 13, 2013 at 5:56 PM, Zaar Hai <[email protected]> wrote: > > Hello dear list. > > I'm running into the strange problem while using flask+uwsgi+nginx combo: > When I return a 7k requests it occasionally gets cut to 4023 bytes by > nginx. > > I see the following lines in the respective logs: > uwsgi: > [pid: 2559|app: 0|req: 3/10] 127.0.0.1 () {32 vars in 448 bytes} [Sun Jan > 13 15:44:08 2013] GET /v1/table?url= > http://localhost:8890/static/table.html => generated 7086 bytes in 3511 > msecs (HTTP/1.0 200) 2 headers in 73 bytes (1 switches on core 0) > > nginx: > 127.0.0.1 - - [13/Jan/2013:15:45:12 +0000] "GET /v1/table?url= > http://localhost:8890/static/table.html HTTP/1.0" 200 4023 "-" > "Wget/1.11.4" "-" > > As you can see, uwsgi reports that 7086 bytes being generated, however > nginx sends just 4023 bytes and that's it. HTTP header advertises the > correct length, so the browser hangs waiting for the rest of the data: > Server: nginx > Date: Sun, 13 Jan 2013 15:46:47 GMT > Content-Type: application/json > Content-Length: 7086 > Connection: keep-alive > > > System: > Debian Lenny 64-bit > uwsgi 1.4.4 > nginx 1.2.6 > > Thanks in advance for your advice. > -- > Zaar > -- Zaar
_______________________________________________ uWSGI mailing list [email protected] http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
