perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Prime <>
Subject Re: Apache::DBI
Date Wed, 22 Jul 2009 03:39:12 GMT
Adam Prime wrote:
> What I wanted to do was fix this issue:
> either by checking the various server starting variables for each of the
> apis, or simply throwing an eval around the push_handler.

I've been looking into this bug a bit tonight, and it seems to me that
the problem is maybe with restart_count.

This code:

if (Apache2::ServerUtil::restart_count() == 1) {
    debug(2, "$prefix skipping connection during server startup, read
the docu !!");
    return $drh->connect(@args);

appears earlier in the connect function, and based on the comments, it
would appear that any connection to the database that happens during
startup (which to me should mean any time before the end of the
ChildInitPhase) should not be cached. The problem is PostConfig is run
twice on startup, once with restart_count == 1, and once with
restart_count == 2.  So the second time through, it gets past that if
statement, and blows up when it hits the code that tries to push_handler().

The documentation here is also no longer true:

If I put that code into my, i get:

cnt: 1
cnt: 2
cnt: 3
cnt: 4
cnt: 5
cnt: 6
cnt: 7

I'm going to fool around with things a bit more.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message