Index: lib/Apache/DBI.pm
===================================================================
--- lib/Apache/DBI.pm	(revision 1489197)
+++ lib/Apache/DBI.pm	(working copy)
@@ -124,8 +124,10 @@
     # unpredictable query results.
     # See: http://perl.apache.org/docs/2.0/user/porting/compat.html#C__Apache__Server__Starting__and_C__Apache__Server__ReStarting_
     if (MP2) {
-        require Apache2::ServerUtil;
-        if (Apache2::ServerUtil::restart_count() == 1) {
+        require ModPerl::Util;
+        my $callback = ModPerl::Util::current_callback();
+        if ($callback !~ m/Handler$/ or
+            $callback =~ m/(PostConfig|OpenLogs)/) {
             debug(2, "$prefix skipping connection during server startup, read the docu !!");
             return $drh->connect(@args);
         }
