[Fixed]-Gunicorn worker timeout

15๐Ÿ‘

โœ…

I had the same issue using Gunicorn, nGinx, Django and Requests

every time I did:

response = requests.get('http://my.url.com/here')

the workers would timeout

I solved the problem by switching from Syncronous (sync) workers to Asynchronous (eventlet) workers.

if you are launching command line add:

-k 'eventlet'

if you are using a config file add:

worker_class = "eventlet"
๐Ÿ‘คSina Khelil

Leave a comment