Wordpress Error – MySQL server has gone away
Today, my wordpress blog encountered a very serious problem. My blog were unable to load properly. It seems to be having a hard time connecting to the database. I did not do any changes to my wordpress blog. I tested the database with phpmyadmin and it works fine.
The problem occur itself this morning. I figured out that the problem is due to mysql database query timeout. I was unable to access my blog at all. However, I managed to get into the wordpress admin page. In the admin page, it says that my database is out of date and need to proceed with “wordpress upgrade”. This doesn’t make any sense because my database is completely no problem and up to date. I have no choice but to continue with the “Wordpress Upgrade” suggested by wordpress itself.
Now, it shows a lot of errors saying [MySQL server has gone away]. I googled it and found a solution for the wordpress bug. It seems the problem is caused by heavy load from my hosting server. This bug only occur when the hosted server is having heavy server load. The workaround can be found here. If your “wait_timeout” variable is small, and your CPU is heavily loaded, it may make it more likely that your connection to the MySQL server is shut down prematurely. The simple workaround on wp-db.php will fix the heavy load problem that caused your MYSQL connection to terminate.
Hope that everyone with the same problem can overcome it. Good luck!
Popularity: 4%



