MySQL Gone Away Error
This week me and my readers are having difficult time to access my blog, it took forever to load the page and it gives error message, saying “error: [MySQL server has gone away]“.
This error means either the database has been down or the connection to database has been terminated. After some investigation, I found that the database are still live, so the conclusion is the connection between wordpress to mysql had issue.
So, I started to find the root cause behind this, I went through the Mysql variables and saw the “wait_timeout” are set to 100 sec. It just too short to cater some large queries and when the CPU is heavily loaded, connection to Mysql will reach it bottleneck and fails. Some of you may wonder what is “wait_timeout” variable?
wait-timeout is the number of seconds the server waits for activity on a non-interactive connection before closing it. This timeout applies only to TCP/IP and Unix socket file connections, not to connections made via named pipes, or shared memory.
I reported this issue immediately to the web hosting provider and within 24 hours, they alter the “wait_timeout” variables to 500 sec.
Problem solved.
Source:http://dev.mysql.com







