title: Stop uwsgi performing harakiri (seriously)
body: <p>I've been trying to track down a problem with uwsgi where the uwsgi process kills itself.</p>
  
  <p>The oh-so-helpful log files just say...</p>
  
  <pre><code>F*CK !!! i must kill myself (pid: 9984 app_id: 0)...
  </code></pre>
  
  <p>A little Googling led me to <a href="https://github.com/unbit/uwsgi/blob/master/core/uwsgi.c#L1314" rel="noreferrer">this line in the source code</a>...</p>
  
  <pre><code>void harakiri() {
      uwsgi_log("\nF*CK !!! i must kill myself (pid: %d app_id: %d)...\n", uwsgi.mypid, uwsgi.wsgi_req-&gt;app_id);
      //Some other stuff
      exit(0);
  }
  </code></pre>
  
  <p>Whether it dies or not varies but seems (from Googling) to be tied to how long a request takes. In this instance, the request is streaming back a dynamically generated Pdf. The generation happens in the background but once it's complete, a new request comes in to retrieve it. The Pdf can be potentially quite large (worst-case, 50-60MB) which - depending on the connection - speed explains why requests might reach a timeout threshold.</p>
  
  <p>How can I configure uwsgi to either never time out or have extremely high timeouts? The app is being used on private networks and I'd rather it was slow and succeeded than died.</p>