Hi everyone,

Well, here's an update. VERY preliminary tests show that the PostgreSQL
message in question is not caused by the child exiting. I have a 1
MacClients prefork Apache with MaxRequestsPerChild of 5 and I have a
'warn' statement on the PerlChildExitHandler to alert me when the child
exits. The message doesn't appear when the child exits (unless there's
some buffering going in the PostgreSQL logs, which is likely.)

However, the message does appear when I stop Apache. Hmm, very
interesting. (It may be worth noting that I'm running on OS X, I still
need to test on Linux.) 

I will revisit this sometime in January. We have year-end things to do
here at work and it's absorbing all my time. Bleah. I'd rather play with
Apache. :)

Thanks,
--Joel


>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

Reply via email to