Optimal design for threading with gunicorn and flask apps..

Posted by ReallyReadyRain3@reddit | Python | View on Reddit | 9 comments

I have a Flask Web application that spawns multiple threads at runtime using the threading module.

Each thread is waiting for an item to be put on the queue. Items are added to the queue via the UI.

This issue appears when I put gunicorn in front of it, I get this issue:

Exception ignored in: >

Traceback (most recent call last): File "site-packages/gevent/threading.py", line 398, in after_fork_in_child assert not thread.is_alive() ^^^^^^^^^^^^^^^^^