Indeed, but mod_perl2 reached RC5 a few days ago and seems (to us) stable enough to even use in production environments.
For de DBI module however, we had problems with it, the internal ping process did not work, so we contstantly had a 'runaway' MySQL database. We fixed it by implementing the ping below, and it seems stable now:
sub ping {
my $ret = 0;
if (time - $DBI::lastPing < 10) { #check once in 10 seconds
return 1;
}
eval {
local $SIG{__DIE__} = sub { return (0); };
local $SIG{__WARN__} = sub { return (0); };
# adapt the select statement to your database:
$ret = $DBH::conn->do('select 1');
$DBI::lastPing = time; #record time in seconds
};
$debug && print STDERR "DBH.pm: pinging DB handle: $ret\n";
return ($@) ? 0 : $ret;
}
"We all agree on the necessity of compromise. We just can't agree on when it's necessary to compromise." - Larry Wall.
|