Re: Apache::DBI and PerlChildExitHandler

[prev] [thread] [next] [Date index for 2004/12/22]

From: Perrin Harkins
Subject: Re: Apache::DBI and PerlChildExitHandler
Date: 16:34 on 22 Dec 2004
On Tue, 2004-12-21 at 09:26 -0500, Joel wrote:
> And from what I understand, this is caused when the Apache child exists
> and does not execute an explicit $dbh->disconnect() on the database
> handle. That is, the connection is not being closed properly before the
> handle goes out of scope.

That's a reasonable guess.

> If this assumption is correct, I think it can be remedied by adding a
> PerlChildExitHandler to simply do a $dbh->disconnect() as the child is
> exiting.

Good idea.  Go for it, and if it works send in an Apache::DBI patch.
You may have to get a little tricky in order to issue the disconnect,
since Apache::DBI is overriding this.

> The only nagging thing about this is why hasn't anyone thought of this
> and implemented it before?

It doesn't result in errors in the apache error_log.

- Perrin


        -- 
        Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html

Apache::DBI and PerlChildExitHandler
Joel 14:26 on 21 Dec 2004

Re: Apache::DBI and PerlChildExitHandler
Stas Bekman 16:09 on 21 Dec 2004

Re: Apache::DBI and PerlChildExitHandler
Stas Bekman 20:26 on 22 Dec 2004

Re: Apache::DBI and PerlChildExitHandler
Perrin Harkins 16:34 on 22 Dec 2004

Generated at 12:16 on 16 Jan 2005 by mariachi v0.52