SQLSTATE[HY000]: General error: 2006 MySQL server has gone away

"The reason behind this crash is packet size. By default, MySQL configuration max_allowed_packet is set it to 16M. This settings may introduce this exception in your website..

Solution:
To resolve that problem you needs to increase max_allowed_packet variable in MySQL. Add following line in my.ini 

max_allowed_packet=100M 

Save the file and restart MySQL service. Now onward you will never get that kind exception in your open source / website."

Source: http://madhavvyas.blogspot.my/2011/04/sqlstatehy000-general-error-2006-mysql.html

Tips: http://madhavvyas.blogspot.my/


"Primary Problem:

1) The server timed out and closed the connection which is the most common cause.

Solutions to Problem 1:

1) The first thing to check is the wait_timeout variable in the my.cnf or my.ini config file. You may need to increase the time for it to work. By just increasing the memory allocation may allow more data through-put but may not provide enough time window for the data to be processed. You may try setting the wait_timeout to about 600 seconds and adjust it even higher once error 2006 has vanished. When you restart mysql the wait_timeout should be near 28800 seconds or just about 8 hours or so.

2) The server might have received a package of data too large to process which is the second common problem. The best way to resolve this common problem is to go into the my.cnf or my.ini files and change the max_allowed_packet to 64M and that should resolve the problem. It is best to do both in order to resolve this issue."

Source:https://www.drupal.org/node/1059718