threads don't run after request returns?

Larry Martell larry.martell at
Fri Apr 7 19:17:08 UTC 2017

On Fri, Apr 7, 2017 at 2:53 PM, Larry Martell <larry.martell at> 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

More information about the nginx mailing list