mysql::db do failed: MySQL server has gone away at ./inclibdb.pm line 1848
Solved by
set a higher value for wait_timeout and connect_timeout in my.cnf
from the MySQL Documentation
- wait_timeout : The number of seconds the server waits for activity on a noninteractive connection before closing it.
- connect_timeout : The number of seconds that the mysqld server waits for a connect packet before responding with Bad handshake
EXAMPLES
- If wait_timeout is 1800 (30 Minutes), the DB Connection will close in 30 minutes if the connection is idle (indicated by
Sleep
in the command column of the processlist). - If connect_timeout is 10, then mysqld will reject you if you cannot login (authenticate) in 10 seconds.
2+