In nginx, I have:
        uwsgi_pass myuwsgi:5000;
        uwsgi_read_timeout 1s;

In uwsgi, I have:
    post-buffering = 8000
    harakiri = 2
    harakiri-verbose = true
    master = true
    processes = 4

And, in my WSGI app (python), I sleep for 4 seconds to trigger nginx
timeout and harakiri.

When I make a request to nginx, I can see it returns 504 Gateway Time-out
after 1 second.
But, after 2 seconds, uwsgi log shows HARAKIRI.

Shouldn't uWSGI move on when nginx closes connection?
Is harakiri the way uWSGI  drops request?
Should I match harakiri value same as nginx timeout (1 second) so that as
soon as nginx closes connection, uWSGI kills the process?

If I turn off harakiri, I can see listen queue piling up since requests are
taking 4 seconds to be handled.
In real life scenario, if I turn off harakiri and there are requests that
take longer than nginx timeout, would those requests block other requests
from being handled in time?

Without thread configuration, does a single uWSGI worker process handle a
single request at a time? Will long requests block other requests unless I
enable harakiri and kill the process?

Thanks.
Sam
_______________________________________________
uWSGI mailing list
uWSGI@lists.unbit.it
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to