Quantcast

threads don't run after request returns?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

threads don't run after request returns?

Larry Martell
I have a django app that I serve with nginx. Some requests that the
app receives start python threads that are not complete when the
request returns a response to the client. When I run with the django
devel server the threads continue to run to completion. But when I run
with nginx it seems that the threads terminate when the response is
sent. Would that be expected or is there something else going on? If
that is expected, is there a way I can get around this?
_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: threads don't run after request returns?

Larry Martell
On Fri, Apr 7, 2017 at 2:53 PM, Larry Martell <[hidden email]> wrote:
> I have a django app that I serve with nginx. Some requests that the
> app receives start python threads that are not complete when the
> request returns a response to the client. When I run with the django
> devel server the threads continue to run to completion. But when I run
> with nginx it seems that the threads terminate when the response is
> sent. Would that be expected or is there something else going on? If
> that is expected, is there a way I can get around this?

I have a bit more info on this ... the server was in the state where
it seemed the threads were no longer running and then I restarted
uwsgi and then the threads ran to completion! So now I am very
confused - they clearly were still around, but seeming in some blocked
state and they were able to resume when uwsgi restarted. Can anyone
shed any light on what is going on? Or should I post on the uwsgi
list?
_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx
Loading...