Gunicorn worker timeout

人走茶凉 提交于 2019-12-03 11:28:21

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"
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!