couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Candler <B.Cand...@pobox.com>
Subject Re: mochiweb socket options discriminating against slow connections
Date Fri, 06 Nov 2009 11:01:18 GMT
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.

Mime
View raw message