elxecommerce Posted July 13, 2021 Share Posted July 13, 2021 (edited) HI there, we are getting this errors wen importing products: [2021-07-13 17:45:18] request.CRITICAL: Uncaught PHP Exception PDOException: "SQLSTATE[HY000]: General error: 2006 MySQL server has gone away" What can be happening?? Edited July 15, 2021 by elxecommerce (see edit history) Link to comment Share on other sites More sharing options...
Crezzur.com Posted July 14, 2021 Share Posted July 14, 2021 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. (example: wait_timeout = 28800) You may also need to increase the innodb_log_file_size mysql variable in your my.cnf configuration. (Example: innodb_log_file_size = 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. set max_allowed_packet = 128M, then restart your MySQL server: sudo /etc/init.d/mysql restart Once you’ve made these changes, and restarted your MySQL or MariaDB server, the issue should be fixed and no more error triggered. If not, try increase the 128M values to 256M for example. In websites with a lot of traffic and data, you might even need to increase the value to 1024M. Link to comment Share on other sites More sharing options...
elxecommerce Posted July 15, 2021 Author Share Posted July 15, 2021 Hi thanks reply, I changed server to increase mysql memory. worked. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now