couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Candler <>
Subject Re: mochiweb socket options discriminating against slow connections
Date Sun, 08 Nov 2009 08:58:37 GMT
On Fri, Nov 06, 2009 at 11:01:18AM +0000, 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.

It appears that (a) this is configurable, and (b) it defaults to 300

# Timeout: The number of seconds before receives and sends time out.
Timeout 300

View raw message