On Tue, 8 Feb 2000, Terry G Lorber II wrote:
> DBD::mysql::st execute failed: MySQL server has gone away at slashmod.pm
> line 23
[...]
> Is this a server problem, a perl problem, or a MySQL problem? Do I need
> to adjust a timeout setting somewhere?
Sounds like you need Apache::DBI.
1) Enable Apache::DBI either with 'PerlModule Apache::DBI' in httpd.conf
or 'use Apache::DBI ();' in your startup.pl. Apache::DBI wraps some
DBI methods to maintain persistant connections.
2) For MySQL, you'll need to add a keepalive routine to your startup.pl:
sub Apache::DBI::db::ping {
my $dbh = shift;
return $dbh->do('select 1');
}
3) Also, you may want to increase the mysqld connection timeout in my.cnf:
[mysqld]
set-variable = wait_timeout=129600
- Matt