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
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.
Usually worker timeout will happen if the request take more time. Try add new parameter called --timeout <some value>
it should work.
ex: gunicorn test_app.py -b 127.0.0.1:8000 --log-level=debug --log-file /tmp/log -t 900