Link to home
Start Free TrialLog in
Avatar of bobwood2000
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_hashref($q2);

Any idea of what could be going on?  Thanks.
ASKER CERTIFIED SOLUTION
Avatar of Kim Ryan
Kim Ryan
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of bobwood2000
bobwood2000

ASKER

Thanks for the help.

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).