Sam Lee
2018-07-27 14:16:01 UTC
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_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