Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: Uncaught Exception in Shutdown Function General Error:MySQL server has gone away  (Read 2616 times)

0 Members and 1 Guest are viewing this topic.

sajugovind

  • Guest

Recently got this error message while working on a Drupal 7.22 website.

Site Down with General Error: MySQL server has gone away

Sometimes it's hard to find the solution to this problem. The error message is so wordy and goes on for several lines. When searching Google for a solution, what search phrase do you use? Do you search for "Uncaught Exception in Shutdown Function" or "General Error: 2006 MySQL server has gone away"?

Here are some solutions to this problem.

1. Press F5 on your browser to refresh the screen. For some people, this simple step solved the problem.

2. Edit your my.cnf configuration file to increase max allowed packet size.

Find the config file called my.cnf

This is the mySQL configuration file. The max_allowed_packet size is set too low by default. Mine was set to 1M. Sometimes it is set to 16M. This setting may introduce this exception error in your Drupal 7 website.

Solution:
To resolve this problem, you need to increase max_allowed_packet variable in MySQL.

Edit the following line in my.cnf

max_allowed_packet = 100M

Save the file and restart MySQL service. From now on, you will never get this kind of exception in your Drupal website.