bobwood2000
asked on
MySQL server has gone away...
I have written a Perl script that accesses a MySQL database repeatedly. After a few hundred selections & insertions into the database, subsequent selections are always answered with the following error message:
DBD::mysql::db selectrow_hashref failed: MySQL server has gone away at Metabase.pm line 67.
However, Line 67 is just, and it worked perfect for the first few hundred database queries.
return $obj->{dbh}->selectrow_has href($q2);
Any idea of what could be going on? Thanks.
DBD::mysql::db selectrow_hashref failed: MySQL server has gone away at Metabase.pm line 67.
However, Line 67 is just, and it worked perfect for the first few hundred database queries.
return $obj->{dbh}->selectrow_has
Any idea of what could be going on? Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Rather than timing out, it seems I was trying to insert too much data into a single column. I was able to change the limit on the amount of data that may be inserted into a single column by adding "set-variable = max_allowed_packet=4M" (no quotes) to my.ini/my.cnf file in the [mysqld] block (and then restarting mysqld).