Boysenberry Payne wrote:
What do I need to do
to fix it?
You probably just need to raise the maximum number of connections on
your MySQL servers.
If you use two different database servers then you should be seeing a
total number of connections on each one that matches the number of child
processes running on your mod_perl server.
$self->{flags} = { 'AutoCommit' => 1, 'RaiseError' => 1 } unless
$self->{flags};
Connecting with different options sometimes will lead to opening more
connections rather than using an existing one. You may want to always
connect with the same flags and then change them on the returned
connection instead. You can use the Apache::DBI debugging switch to see
if connections are being reused or not.
if( $self->{db} ) {
my $h = $self->{db}->{dbh};
$h->disconnect if $h;
That is pointless, since Apache::DBI doesn't allow disconnects.
- Perrin