You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Graham Leggett <mi...@sharp.fm> on 2004/05/21 18:29:58 UTC
Applying timeouts to pool cleanups, possible?
Hi all,
The mod_ldap module in httpd provides an LDAP connection pool. When
connections are created, they are registered with apr pools as a cleanup
when the pool is reclaimed, which in our case only happens on a graceful
server restart.
On Solaris, this leaves many long lived connections held open in the
CLOSE_WAIT state, as the server timed out, but httpd's LDAP connection
pool didn't notice.
Is there an apr function that could be used to put a time limit on a
pool cleanup, in other words "run this cleanup after X minutes"? It
would be up to the cleanup to decide whether timing out the connection
would be appropriate.
Regards,
Graham
--
Re: Applying timeouts to pool cleanups, possible?
Posted by Paul Querna <ch...@force-elite.com>.
On Sat, 2004-05-22 at 03:19 +0200, Graham Leggett wrote:
> Hmmm... it does. Is there any example code I can look at to get this
> working?
mod_authn_dbi uses it: http://mod-auth.sourceforge.net/
The Database Pooling Modules also use apr_reslist:
http://apache.webthing.com/mod_pg_pool.c
http://apache.webthing.com/mod_mysql_pool.c
and,
http://cvs.sourceforge.net/viewcvs.py/mod-auth/mod_dbi_pool/src/mod_dbi_pool.c?rev=1.8&view=auto
-Paul Querna
Re: Applying timeouts to pool cleanups, possible?
Posted by Graham Leggett <mi...@sharp.fm>.
Paul Querna wrote:
> Sure sounds like it should be using apr_reslist.
Hmmm... it does. Is there any example code I can look at to get this
working?
Regards,
Graham
--
Re: Applying timeouts to pool cleanups, possible?
Posted by Paul Querna <ch...@force-elite.com>.
Sure sounds like it should be using apr_reslist.
On Fri, 2004-05-21 at 18:29 +0200, Graham Leggett wrote:
> Hi all,
>
> The mod_ldap module in httpd provides an LDAP connection pool. When
> connections are created, they are registered with apr pools as a cleanup
> when the pool is reclaimed, which in our case only happens on a graceful
> server restart.
>
> On Solaris, this leaves many long lived connections held open in the
> CLOSE_WAIT state, as the server timed out, but httpd's LDAP connection
> pool didn't notice.
>
> Is there an apr function that could be used to put a time limit on a
> pool cleanup, in other words "run this cleanup after X minutes"? It
> would be up to the cleanup to decide whether timing out the connection
> would be appropriate.
>
> Regards,
> Graham
> --