I have no idea how to reproduce this, but it's been a huge issue for me so I'll try my best to explain:
I have an application that serves long running HTTP responses via generators (hundreds of megabytes), and for certain clients, flup times out the response for them for no obvious reason. I've switched to using mod_wsgi for this particular application, and it doesn't have the problem at all.
Here's what the traceback looked like from my Apache error log:
Traceback (most recent call last):
File "/usr/local/lib/python2.5/site-packages/flup-1.0-py2.5.egg/flup/server/fcgi_base.py", line 558, in run
protocolStatus, appStatus = self.server.handler(self)
File "/usr/local/lib/python2.5/site-packages/flup-1.0-py2.5.egg/flup/server/fcgi_base.py", line 1120, in handler
write(data)
File "/usr/local/lib/python2.5/site-packages/flup-1.0-py2.5.egg/flup/server/fcgi_base.py", line 1085, in write
req.stdout.write(data)
File "/usr/local/lib/python2.5/site-packages/flup-1.0-py2.5.egg/flup/server/fcgi_base.py", line 315, in write
self._write(data)
File "/usr/local/lib/python2.5/site-packages/flup-1.0-py2.5.egg/flup/server/fcgi_base.py", line 299, in _write
self._conn.writeRecord(rec)
File "/usr/local/lib/python2.5/site-packages/flup-1.0-py2.5.egg/flup/server/fcgi_base.py", line 697, in writeRecord
rec.write(self._sock)
File "/usr/local/lib/python2.5/site-packages/flup-1.0-py2.5.egg/flup/server/fcgi_base.py", line 530, in write
self._sendall(sock, header)
File "/usr/local/lib/python2.5/site-packages/flup-1.0-py2.5.egg/flup/server/fcgi_base.py", line 507, in _sendall
sent = sock.send(data)
timeout: timed out
If you want to take a look at the application I'm running, you can find it here: http://bitheap.org/hg/streamtar/.