I am completely confused...

I have a couple of connections I use - one for general information, 
another for authentication purposes.  I am wanting to use Apache::DBI 
to cache the connections.

When running as httpd -X I have no problems whatsoever.  However,
running as normal, it will work fine for a while (once through each
daemon) and then start flaking out.  The following are the error
messages that I do get:

DBI->connect failed: Lost connection to MySQL server during query at 
/www/lib/perl/Fresh/DBI.pm line 43
DBI->connect failed: Lost connection to MySQL server during query at 
/www/lib/perl/Fresh/DBI.pm line 54
[Tue Oct 26 21:02:49 1999] [error] access to /www/mod_perl/htdocs/user_admin/edit 
failed for modperl.jamesmith.com, reason: invalid account
DBI->connect failed: Lost connection to MySQL server during query at 
/www/lib/perl/Fresh/DBI.pm line 43
DBI->connect failed: Lost connection to MySQL server during query at 
/www/lib/perl/Fresh/DBI.pm line 54
[Tue Oct 26 21:02:54 1999] [error] access to /www/mod_perl/htdocs/user_admin/edit 
failed for modperl.jamesmith.com, reason: invalid account
DBI->connect failed: Lost connection to MySQL server during query at 
/www/lib/perl/Fresh/DBI.pm line 43
DBI->connect failed: Lost connection to MySQL server during query at 
/www/lib/perl/Fresh/DBI.pm line 54
[Tue Oct 26 21:04:59 1999] [error] access to /www/mod_perl/htdocs/user_admin/edit 
failed for modperl.jamesmith.com, reason: invalid account
DBI->connect failed: Lost connection to MySQL server during query at 
/www/lib/perl/Fresh/DBI.pm line 43
DBI->connect failed: Lost connection to MySQL server during query at 
/www/lib/perl/Fresh/DBI.pm line 54
[Tue Oct 26 21:05:16 1999] [error] access to /www/mod_perl/htdocs/user_admin/edit 
failed for modperl.jamesmith.com, reason: invalid account

I'm not looking so much for an answer (though that would be nice) but for
a few pointers on where to look next.  I seem to get these errors with or
without Apache::DBI.  The following is the cleanup routine:

sub DESTROY {
  my $self = shift;
  if($self) {
    $$self{dbh}->disconnect;
    delete $$self{dbh};  # required to properly disconnect 
    $$self{user_dbh}->disconnect;
    delete $$self{user_dbh};  # required to properly disconnect
  }
}

I have followed the directions in Apache::DBI and still get these results.
(Thinking it might be the destruction *somehow* of the database handles.)
Not sure why, but the delete statements are required without Apache::DBI
to avoid the ``destroyed without disconnect'' error messages.
--
James Smith <[EMAIL PROTECTED]>, 409-862-3725
Texas A&M CIS Operating Systems Group, Unix

Reply via email to