Knowledge Base Troubleshooting How do I fix the error: "MYSQL SERVER HAS...

How do I fix the error: "MYSQL SERVER HAS GONE AWAY"?

Author Bill Brewer
Created 06-26-2019 11:23 am
Last Modified 06-26-2019 11:24 am
The MySQL server has gone away (error 2006) occurs when a large set of data is inserted into the database.  Normally this happens when storing cached data in the gfw_cache table.

There are two solutions:

1.  If you are running a site with large datasets (for example: 2,000 product categories) you will need to adjust your MySQL server to allow larger packet sizes.  To fix, you can increase the maximal packet size limit max_allowed_packet in my.cnf file, eg. set max_allowed_packet = 128M, then restart your MySQL server: sudo /etc/init.d/mysql restart

2.  This is sometimes, but far less commonly, caused by a timeout.  You may also need to increase the innodb_log_file_size mysql variable in your my.cnf configuration to for example 128MB or higher.

Was this article helpful?


Still Have Questions?

Let Us Help You

My Account