Gunicorn workers timeout no matter what

后端 未结 2 1405
[愿得一人]
[愿得一人] 2021-02-13 10:27

I\'m trying to run a simple flask app through gunicorn, but having my workers timeout no matter what I do. Whether there\'s activity against the app or not, workers will always

2条回答
  •  故里飘歌
    2021-02-13 11:09

    For anyone having this issue in the future, the main problem was me doing:

    app.run()
    

    and not

    if __name__ == '__main__':
        app.run()
    

    with the former, the workers would wind up being run through flask instead of gunicorn, and the whole thing would become confused. Just switching to the latter fixed my issue.

提交回复
热议问题