File: day_209__The_Bug.mdwn

package info (click to toggle)
git-annex 5.20141125%2Bdeb8u1
  • links: PTS
  • area: main
  • in suites: jessie
  • size: 37,832 kB
  • sloc: haskell: 42,603; sh: 1,080; ansic: 498; makefile: 316; perl: 125
file content (23 lines) | stat: -rw-r--r-- 1,175 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
> And so we waited. Tick-tock, blink-blink, thirty seconds stretched
> themselves out one by one, a hole in human experience. -- The Bug

I *think* I've managed to fully track down the [[webapp_hang]]. It is,
apparently, a bug in the Warp web server's code intended to protect against
the [Slowloris](http://ha.ckers.org/slowloris/) attack. It assumes,
incorrectly, that a web browser won't reuse a connection it's left idle for
30 seconds. Some bad error handling keeps a connection open with no thread
to service it, leading to the hang.
<https://github.com/yesodweb/wai/issues/146>

Have put a 30 minute timeout into place as a workaround, and, unless
a web browser sits on an idle connection for a full 30 minutes and then
tries to reuse it, this should be sufficient.

I was chasing that bug, quietly, for 6 months. Would see it now and
then, but not be able to reproduce it or get anywhere with analysis.
I had nearly given up. If you enjoy stories like that, read Ellen
Ullman's excellent book The Bug.

> To discover that between the blinks of the machine’s shuttered eye—going
> on without pause or cease; simulated, imagined, but still not caught—was
> life.