title: Gunicorn worker killed
body: <p>I am running a flask application (rest api) with gunicorn and I am seeing almost every 30 seconds a batch of <code>[CRITICAL] WORKER TIMEOUT (pid:14727)</code>. 
  My settings are the following:</p>
  
  <pre><code>gunicorn --worker-class gevent \
           --timeout 30 --graceful-timeout 20
           --max-requests-jitter 2000 --max-requests 1500
           -w 50
           --log-level DEBUG --capture-output
           --bind 0.0.0.0:5000 run:app
  </code></pre>
  
  <p>I saw previous post that had said to throw more RAM at this but from the looks of it:</p>
  
  <pre><code>$ ulimit -a
  core file size          (blocks, -c) 0
  data seg size           (kbytes, -d) unlimited
  scheduling priority             (-e) 0
  file size               (blocks, -f) unlimited
  pending signals                 (-i) 513926
  max locked memory       (kbytes, -l) 64
  max memory size         (kbytes, -m) unlimited
  open files                      (-n) 131071
  pipe size            (512 bytes, -p) 8
  POSIX message queues     (bytes, -q) 819200
  real-time priority              (-r) 0
  stack size              (kbytes, -s) 8192
  cpu time               (seconds, -t) unlimited
  max user processes              (-u) 1550298
  virtual memory          (kbytes, -v) unlimited
  file locks                      (-x) unlimited
  </code></pre>
  
  <p>The Heap is unlimited and stack size is slightly over 8Mb. </p>
  
  <h2>Log sample</h2>
  
  <pre><code>+0000] [26657] [DEBUG] GET /timer
  [2017-01-21 14:07:30 +0000] [26657] [DEBUG] GET /timer
  [2017-01-21 14:07:33 +0000] [26657] [DEBUG] GET /timer
  [2017-01-21 14:07:33 +0000] [26652] [DEBUG] GET /timer
  10.193.80.149 - - [21/Jan/2017:14:07:34 +0000] "GET /timer?id=699ec59eccd3fb929b3dd7707e542ed15acd4181:6f136b54-2cb5-42ef-9def-f69caaba57ef HTTP/1.1" 200 - "-" "-"
  10.193.80.147 - - [21/Jan/2017:14:07:35 +0000] "GET /timer?id=e7963c53603ed9249b0aa557d8a64cea89fb0bf4:6f136b54-2cb5-42ef-9def-f69caaba57ef HTTP/1.1" 200 - "-" "-"
  10.193.80.150 - - [21/Jan/2017:14:07:35 +0000] "GET /timer?id=4b750805193fb4d00c3ce1465c266ed932a24e55:6f136b54-2cb5-42ef-9def-f69caaba57ef HTTP/1.1" 200 - "-" "-"
  [2017-01-21 14:07:37 +0000] [26657] [DEBUG] GET /timer
  [2017-01-21 14:07:37 +0000] [26657] [DEBUG] GET /timer
  [2017-01-21 14:07:37 +0000] [26635] [CRITICAL] WORKER TIMEOUT (pid:27202)
  [2017-01-21 14:07:37 +0000] [26635] [CRITICAL] WORKER TIMEOUT (pid:27205)
  </code></pre>
  
  <p>What I noticed was only a handful of workers are always doing the work <code>26657</code>, <code>26652</code> <code>26651</code> everything else just seems to be giving me the <code>Worker timeout</code></p>