NGINX - Python - UWSGI kill issue NGINX - Python - UWSGI kill issue nginx nginx

NGINX - Python - UWSGI kill issue


I know the question is a bit old, but I had the same problem and Google got me here, so I will answer for anyone who gets here in the same boat.

The problem seems to be caused by the "--enable-threads" option, we have several applications running with uwsgi and flask and only the one with this option has the problem.

If what you want is to have the uwsgi process dying faster, you can add this options:

reload-mercy = int

worker-reload-mercy = int

They will cause the uwsgi to force the process to quit after int seconds.

On the other hand, if all you need is to reload the uwsgi, try just sending a SIGHUP signal. This will cause the uwsgi to reload its children.

POST NOTE: Seems I had spoken too soon, using SIGHUP also hangs sometimes. I am using the mercy options to avoid the hanging to take too long.

Also, I found the issue report on uwsgi github, if anyone wants to follow it:

https://github.com/unbit/uwsgi/issues/844