can get "uwsgi_buffering off" working..
Maxim Dounin
mdounin at mdounin.ru
Fri Dec 7 16:06:03 UTC 2012
Hello!
On Thu, Dec 06, 2012 at 09:31:45PM +0200, kirpit wrote:
> Hi,
>
> I'm just trying to setup a non-blocking server backed with uwsgi/gevent. So
> I need to turn off uwsgi buffering as it's necessary. However, it seems
> quite impossible to get it working even though it says "46382#0: *1 http
> upstream process non buffered downstream" within the debug output and I
> started to consider that would be a bug. I've tried both with v1.2.5 and
> v1.2.4.
>
> Here the output belongs to requesting a static file that is handled by
> uwsgi itself (via "static-map" directive;
> http://projects.unbit.it/uwsgi/wiki/Doc).
It looks like you are trying to solve wrong problem. From nginx
point of view response was fully got from upstream (as upstream
closed the connection), and everything in nginx itself works fine.
But per uwsgi logs you've provided it looks like something bad
happened in uwsgi worker process, but it's doesn't look like
something related to nginx:
[...]
> Thu Dec 6 21:12:31 2012 - *** HARAKIRI ON WORKER 2 (pid: 46388, try: 1) ***
> Thu Dec 6 21:12:31 2012 - *** backtrace of 46388 ***
> Thu Dec 6 21:12:31 2012 - 0 uwsgi 0x000000010c9bb1db uwsgi_backtrace + 43
> Thu Dec 6 21:12:31 2012 - 1 uwsgi 0x000000010c9baf11 what_i_am_doing + 49
> Thu Dec 6 21:12:31 2012 - 2 libsystem_c.dylib 0x00007fff896698ea _sigtramp + 26
> Thu Dec 6 21:12:31 2012 - 3 ??? 0x00007f8ee3c13990 0x0 + 140251683174800
> Thu Dec 6 21:12:31 2012 - 4 core.so 0x000000010e49c08b ev_run + 1124
[...]
> Thu Dec 6 21:12:31 2012 - *** end of backtrace ***
> Thu Dec 6 21:12:33 2012 - *** HARAKIRI ON WORKER 2 (pid: 46388, try: 2) ***
> Thu Dec 6 21:12:34 2012 - DAMN ! worker 2 (pid: 46388) died, killed by
> signal 9 :( trying respawn ...
> Thu Dec 6 21:12:34 2012 - Respawned uWSGI worker 2 (new pid: 46401)
> Thu Dec 6 21:12:34 2012 - mapping worker 2 to CPUs:
[...]
Here how it goes from nginx point of view:
> 2012/12/06 21:11:30 [debug] 46382#0: *1 socket 10
> 2012/12/06 21:11:30 [debug] 46382#0: *1 connect to 127.0.0.1:9001, fd:10 #3
(connected to the backend)
[...]
> 2012/12/06 21:11:30 [debug] 46382#0: *1 recv: fd:10 4096 of 4096
> 2012/12/06 21:11:30 [debug] 46382#0: *1 http uwsgi status 200 "200 OK"
> 2012/12/06 21:11:30 [debug] 46382#0: *1 http uwsgi header: "Content-Length: 113975"
> 2012/12/06 21:11:30 [debug] 46382#0: *1 http uwsgi header: "Last-Modified: Wed, 28 Nov 2012 11:25:02 GMT"
> 2012/12/06 21:11:30 [debug] 46382#0: *1 http uwsgi header done
> 2012/12/06 21:11:30 [debug] 46382#0: *1 HTTP/1.1 200 OK
(got response headers and start of the response body)
[...]
> 2012/12/06 21:11:30 [debug] 46382#0: *1 http upstream process non buffered upstream
> 2012/12/06 21:11:30 [debug] 46382#0: *1 recv: eof:1, avail:89, err:0
> 2012/12/06 21:11:30 [debug] 46382#0: *1 recv: fd:10 89 of 4096
(got some mory bytes of the response body)
> 2012/12/06 21:11:30 [debug] 46382#0: *1 recv: eof:1, avail:0, err:0
(got EOF from the backend)
--
Maxim Dounin
http://nginx.com/support.html
More information about the nginx
mailing list