httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "MATHIHALLI,MADHUSUDAN (HP-Cupertino,ex1)" <>
Subject RE: keepalive status
Date Wed, 08 Aug 2001 22:31:36 GMT
Hi Dean,
	Thanks for the info. I'm not sure if we can totally rely on
r->connection->aborted flag always - the obvious question will be : how
often do I need to keep checking the flag ?.. One observation is that you
get APR_TIMEUP error when you try to read after a keepalive timeout - is it
a good indication for the modules to cleanup any connection specific data at
that point ?..
	Instead, it'd have been cool if we had a close-connection hook
(similar to pre-connection and process-connection) - so that incase of a
aborted connections OR keepalive connections, as soon as the core decides to
close the socket / connection (for whatever reason), the applications can be
notified immediately to perform any cleanup actions.. Now that there's no
such thing, I was just looking for a ideal place to perform the cleanup
actions ?.. Any ideas are welcome..


-----Original Message-----
From: dean gaudet []
Sent: Wednesday, August 08, 2001 3:16 PM
To: ''
Subject: Re: keepalive status

in apache-1.3 you have two choices -- if you use hard timeouts then you
don't get any notification, the request is aborted and longjmp() takes the
child back to its main loop.  if you use soft timeouts then you eventually
can detect a closed connection by studying r->connection->aborted.
(there are examples in the core.)

in apache-2.0 you only have the second choice, except i'm not exactly sure
of the right syntax... you may have to study the result codes of the
various write operations.

in either case the kernel doesn't always know the client has gone away
immediately, and application notification can take some time.

in particular there's no easy way to determine the client is gone if
you're not writing anything to the client (i.e. you're waiting on a
database query or some expensive calculation, and have nothing to write to
the client).


On Mon, 6 Aug 2001, MATHIHALLI,MADHUSUDAN (HP-Cupertino,ex1) wrote:

> Quick Question : If keepalive is enabled, how is a module conveyed of a
> dropped connection - OR in other words, what is a good point when a module
> should clean up data after a connection has been dropped / aborted ?..
> Thanks
> -Madhu

View raw message