httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Behlendorf <br...@organic.com>
Subject Re: apache Timeout inconsistencies
Date Sun, 22 Dec 1996 04:43:03 GMT
On Tue, 17 Dec 1996 rasmus@mail1.bellglobal.com wrote:
> >   *) Reset timeout while reading via get_client_block() in mod_cgi.c
> >      Fixes problem with timed out transfers of large files. [Rasmus
> > Lerdorf] 
> > 
> > Coming soon to a 1.2b3 near you. :-)
> 
> Well, perhaps David's point is valid.  What if a single 8K buffer takes
> more time to transfer than what the timeout is set for?  The fix I
> made to mod_cgi.c simply resets the timer every time an 8K buffer is
> read.  If a single 8K buffer takes longer than whatever the timeout is
> set to, the connection will still time out.  Then again, the default
> configured value for the timeout is 400 seconds.  If it takes longer than
> 400 seconds to send 8K, perhaps the connection should time out.
> 
> I actually looked at putting the timer reset right into the read_client_block
> function, but for performance reasons we obviously do not want to call it
> for every byte received.  I figure it was more appropriate to apply the
> timeout to a block as a whole.  This should be documented though.  If
> nowhere else, then in the comment in http_protocol.c such that future
> module writers don't get this wrong.  

I think it would be much better to put this inside the API rather than require
API authors to remember to do it.  Can't it sit inside get_client_block and
still not check for each byte read?

	Brian

--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--
brian@organic.com  www.apache.org  hyperreal.com  http://www.organic.com/JOBS


Mime
View raw message