title: How to find out why uWSGI kill workers?
body: <p>i have app on Pyramid. I run it in uWSGI with these config:</p>
  
  <pre><code>[uwsgi]
  socket = mysite:8055
  master = true
  processes = 4
  vacuum = true
  lazy-apps = true
  gevent = 100
  </code></pre>
  
  <p>And nginx config:</p>
  
  <pre><code>server {
      listen 8050;
      include uwsgi_params;
  
      location / {
          uwsgi_pass mysite:8055;
      }
  }
  </code></pre>
  
  <p>Usually all fine, but sometimes uWSGI kills workers. And i have no idea why.</p>
  
  <p>I see in uWSGI logs:</p>
  
  <pre><code>DAMN ! worker 2 (pid: 4247) died, killed by signal 9 :( trying respawn ...
  Respawned uWSGI worker 2 (new pid: 4457)
  </code></pre>
  
  <p>but in the logs there is no Python exceptions.</p>
  
  <p>sometimes i see in uWSGI logs:</p>
  
  <pre><code>invalid request block size: 11484 (max 4096)...skip
  [uwsgi-http key: my site:8050 client_addr: 127.0.0.1 client_port: 63367] hr_instance_read(): Connection reset by peer [plugins/http/http.c line 614]
  </code></pre>
  
  <p>And nginx errors.log:</p>
  
  <pre><code>*13388 upstream prematurely closed connection while reading response header from upstream, client: 127.0.0.1,
  *13955 recv() failed (104: Connection reset by peer) while reading response header from upstream, client:
  </code></pre>
  
  <p>I think this can be solved by adding buffer-size=32768, but it is unlikely due to this uWSGI kill workers.</p>
  
  <p>Why uwsgi can kill workers? And how can I know the reason?
  The line "DAMN ! worker 2 (pid: 4247) died, ..." nothing to tells.</p>