Gunicorn worker timeout error

后端 未结 15 2014
梦谈多话
梦谈多话 2020-11-29 16:07

I have setup gunicorn with 3 workers 30 worker connections and using eventlet worker class. It is setup behind Nginx. After every few requests, I see this in the logs.

15条回答
  •  执念已碎
    2020-11-29 16:35

    Is this endpoint taking too many time?

    Maybe you are using flask without assynchronous support, so every request will block the call. To create async support without make difficult, add the gevent worker.

    With gevent, a new call will spawn a new thread, and you app will be able to receive more requests

    pip install gevent
    gunicon .... --worker-class gevent
    

提交回复
热议问题