What's the difference between uWSGI's socket-timeout/http-timeout/harakiri? : <p>I wrote a simple WSGI application (using Flask) served by uWSGI (i.e. no other HTTP server but uWSGI) which only supports a single PUT route using which clients can upload a file (potentially ~400MB in size), have it processed on the server and then sent back.</p>

<p>In the uWSGI logs, I noticed two kinds of timeout errors after some time. Usually it's a timeout when sending the response:</p>

<pre><code>Feb 02 20:46:30 myserv uwsgi[18948]: uwsgi_response_sendfile_do() TIMEOUT !!!
Feb 02 20:46:30 myserv uwsgi[18948]: OSError: write error
Feb 02 20:46:30 myserv uwsgi[18948]: [pid: 18954|app: 0|req: 1795/3935] aa.bb.cc.dd () {32 vars in 455 bytes} [Fri Feb  2 20:46:06 2018] PUT /sample.exe =&gt; generated 0 bytes in 24314 msecs via sendfile() (HTTP/1.1 200) 6 headers in 258 bytes (3353 switches on core 0)
</code></pre>

<p>Sometimes though, it's also a timeout when receiving a PUT request:</p>

<pre><code>Feb 03 20:18:32 signserv uwsgi[18948]: [pid: 18953|app: 0|req: 2975/5670] aa.bb.cc.dd () {32 vars in 455 bytes} [Sat Feb  3 20:18:02 2018] PUT /samplefile.exe =&gt; generated 0 bytes in 29499 msecs via sendfile() (HTTP/1.1 200) 6 headers in 258 bytes (2930 switches on core 0)
Feb 03 20:20:30 signserv uwsgi[18948]: [uwsgi-body-read] Timeout reading 16384 bytes. Content-Length: 354414781 consumed: 0 left: 354414781
</code></pre>

<p>Some debugging suggests that this typically happens with clients which are very slow (i.e. which have a high load).</p>

<p>I'd like to alleviate this by increasing some timeouts, but uWSGI appears to support a plethora of timeouts and it's not clear to me which of them are relevant here. I identified three timeouts which sound like I may want to increase them, but I have trouble finding documentation on how they differ:</p>

<ul>
<li><code>socket-timeout</code></li>
<li><code>http-timeout</code></li>
<li><code>harakiri</code></li>
</ul>

<p>Can anyone shed some light on what these timeouts affect, what their default values are and which (if any) of them should be adjusted to avoid above-mentioned issues?</p>
