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 timeout after whatever I set the timeout
value to. What's causing them to timeout? Requests go through successfully when I make them, but workers still timeout. Here's what I'm running:
gunicorn test_app.py -b 127.0.0.1:8000 --log-level=debug --log-file /tmp/log
* Running on http://127.0.0.1:5000/
127.0.0.1 - - [28/Aug/2014 11:23:50] "GET / HTTP/1.1" 200 -
127.0.0.1 - - [28/Aug/2014 11:23:53] "GET / HTTP/1.1" 200 -
* Running on http://127.0.0.1:5000/
* Running on http://127.0.0.1:5000/
And here's what I'm seeing in /tmp/log:
[2014-08-28 11:23:32 -0700] [36868] [INFO] Listening at: http://127.0.0.1:8000 (36868)
[2014-08-28 11:23:32 -0700] [36868] [INFO] Using worker: sync
[2014-08-28 11:23:32 -0700] [36871] [INFO] Booting worker with pid: 36871
[2014-08-28 11:23:32 -0700] [36868] [DEBUG] 1 workers
[2014-08-28 11:24:02 -0700] [36868] [CRITICAL] WORKER TIMEOUT (pid:36871)
[2014-08-28 11:24:02 -0700] [36868] [DEBUG] 1 workers
[2014-08-28 11:24:03 -0700] [36868] [DEBUG] 1 workers
[2014-08-28 11:24:03 -0700] [36872] [INFO] Booting worker with pid: 36872
[2014-08-28 11:24:03 -0700] [36868] [DEBUG] 1 workers
[2014-08-28 11:24:03 -0700] [36868] [DEBUG] 1 workers
[2014-08-28 11:24:33 -0700] [36868] [CRITICAL] WORKER TIMEOUT (pid:36872)
[2014-08-28 11:24:33 -0700] [36868] [DEBUG] 1 workers
[2014-08-28 11:24:33 -0700] [36872] [INFO] Worker exiting (pid: 36872)
[2014-08-28 11:24:33 -0700] [36873] [INFO] Booting worker with pid: 36873
[2014-08-28 11:24:33 -0700] [36868] [DEBUG] 1 workers
[2014-08-28 11:24:33 -0700] [36868] [DEBUG] 1 workers
[2014-08-28 11:25:03 -0700] [36868] [CRITICAL] WORKER TIMEOUT (pid:36873)
As you can see, my worker times out every 30 seconds, even though there's nothing wrong with it. What gives?