My company has been experiencing quite a bit of zombie process creation
when we created our own ping function to work under mod_perl (for
persistent dbh's). It seems like there's one zombie process per httpd
process being created. I have provided the code that we're using to
create the ping function.
sub my_ping
{
eval {
my $sth = $dbh->prepare("SELECT 1 from DUAL");
$sth->execute;
$sth->finish;
};
if ( $@ )
{
eval { $dbh->disconnect() if ( $dbh ); };
$dbh = some_package_name::connect() ;
}
return $dbh;
}
It seems that if the dbh is dead or has problems with the execute or
select statement, the program does a core dump with the following message:
[Mon Nov 13 12:38:21 2000] [notice] child pid 24077 exit signal
Segmentation fault (11)
are there any other alternatives to writing a ping function or testing if
the $dbh is alive so we can reconnect? Much appreciation for any advice
--------------------------------------------------------------------------
Why is College Club the largest and fastest growing college student site?
Find out for yourself at http://www.collegeclub.com