On Nov 6, 2009, at 6:01 AM, Brian Candler wrote:
On Wed, Nov 04, 2009 at 05:37:55PM -0500, Adam Kocoloski wrote:
Ok, confirmed -- this call blocks for 10 seconds when no data is
available on the socket. I think that's the behavior we're looking
for:
detect stale connections, but let slow connections keep working.
10 seconds still seems like an extremely low timeout to me. Drop a few
packets on a busy link and TCP could easily backoff for that long.
Why not, say, 2 minutes? The only resource issue would be the RAM
used by
the idle erlang process.
As a reference, perhaps it would be worth looking at how Apache
httpd deals
with this. I doubt it kicks off clients which have stalled for only 10
seconds, but I haven't got the unpacked source to hand.
Hi Brian, I agree that What Would Apache Do? is a good mantra here.
Looks like the answer is "wait 5 minutes":
http://httpd.apache.org/docs/2.2/mod/core.html#timeout
I'm comfortable making that switch if no one objects. Thanks, Adam