How to Fix General Error: 2006 MySQL Server has Gone Away
Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away in...
This is a temporary error that happens when MailPoet could not establish a database connection at that time. It is automatically retried later and doesn't affect how the plugin works.
WordPress catches those errors and sends a notification about it, so you can check and confirm if your website or plugin is still working properly or not, but in fact, they are harmless.
The MySQL server has gone away (error: 2006) has two main causes and solutions:
- Server timed out and closed the connection. To fix, check that
wait_timeout
mysql variable in your my.cnf configuration file is large enough, egwait_timeout = 28800
You may also need to increase theinnodb_log_file_size
mysql variable in your my.cnf configuration to for example 128MB or higher. - Server dropped an incorrect or too large packet. If mysqld gets a packet that is too large or incorrect, it assumes that something has gone wrong with the client and closes the connection. To fix, you can increase the maximal packet size limit
max_allowed_packet
in my.cnf file, eg. setmax_allowed_packet = 128M
, then restart your MySQL server:sudo /etc/init.d/mysql restart
For both cases, we suggest you contact the support staff of your host and ask for further assistance.