My local site is down with the following error. I've searched issues and forum and tried the suggested fixes (upping mysql max_allowed_packet = 16M, running update.php repeatedly) and I also tried clearing cache tables and manually disabling the last few installed modules via phpmyadmin. Nothing has worked and now at a dead end and not sure what to try next to get it back up and running.

Additional uncaught exception thrown while handling exception.
Original

PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: DELETE FROM {cache} WHERE (cid LIKE :db_condition_placeholder_0 ESCAPE '\\') ; Array ( [:db_condition_placeholder_0] => entity\_info:% ) in cache_clear_all() (line 176 of D:\www\projects\construct3d\drupal7-master\includes\cache.inc).
Additional

PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: SELECT b.* FROM {block} b WHERE (b.theme = :db_condition_placeholder_0) AND (b.status = :db_condition_placeholder_1) ORDER BY b.region ASC, b.weight ASC, b.module ASC; Array ( [:db_condition_placeholder_0] => default_site [:db_condition_placeholder_1] => 1 ) in _block_load_blocks() (line 727 of D:\www\projects\construct3d\drupal7-master\modules\block\block.module).
Uncaught exception thrown in session handler.

PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away in _drupal_session_write() (line 209 of D:\www\projects\construct3d\drupal7-master\includes\session.inc).
Uncaught exception thrown in shutdown function.

PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: DELETE FROM {semaphore} WHERE (value = :db_condition_placeholder_0) ; Array ( [:db_condition_placeholder_0] => 8193656144fb88c50335041.03538706 ) in lock_release_all() (line 269 of D:\www\projects\construct3d\drupal7-master\includes\lock.inc).

Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 2006 MySQL server has gone away' in D:\www\projects\construct3d\drupal7-master\includes\database\database.inc:2136 Stack trace: #0 D:\www\projects\construct3d\drupal7-master\includes\database\database.inc(2136): PDOStatement->execute(Array) #1 D:\www\projects\construct3d\drupal7-master\includes\database\database.inc(664): DatabaseStatementBase->execute(Array, Array) #2 D:\www\projects\construct3d\drupal7-master\includes\database\database.inc(2315): DatabaseConnection->query('SELECT expire, ...', Array, Array) #3 D:\www\projects\construct3d\drupal7-master\includes\lock.inc(167): db_query('SELECT expire, ...', Array) #4 D:\www\projects\construct3d\drupal7-master\includes\lock.inc(146): lock_may_be_available('schema:runtime:...') #5 D:\www\projects\construct3d\drupal7-master\includes\bootstrap.inc(405): lock_acquire('schema:runtime:...') #6 D:\www\projects\construct3d\drupal7-master\includes\bootstrap.inc(427): DrupalCacheArray->set( in D:\www\projects\construct3d\drupal7-master\includes\database\database.inc on line 2136

Comments

inteja’s picture

The last few modules I installed were:

  • simplenews-7.x-1.0-beta2
  • media_gallery-7.x-1.0-beta7
  • multiform-7.x-1.0
  • mimemail-7.x-1.x-dev
  • mailsystem-7.x-2.34

But the site was working for a time after all these modules were installed and I've now manually disabled them in the database system table but the error remains.

--
Brian.

inteja’s picture

Cleared browser cookies and now works ... go figure!

--
Brian.

inteja’s picture

Clearing the cookies logged me out of the site, but as soon as I logged back in I got the error.

Ideas anyone?

--
Brian.

aquadrop’s picture

Hi, I just found a solution that worked fine (for me) here: http://fooninja.net/2011/07/13/drupal-uncaught-exception/
Briefly, you just gotta change the default max_allowed_packet in my.cnf (or my.ini) from 1M to something more, eg, 16M.

Tran’s picture

I've been killing myself trying to install a working newsletter.
Newsletter and Simplenews break the functionality of my site. When installed, things like context and Editing or creating content types are impossible. Clicking the button leads to horrid errors like yours above.
I had to uninstall Simplenews and Entity Tokens to finally get rid of the error on my site.
I believe Entity Tokens is playing a role in this.

HappyJiyoung’s picture

I run windows server and this is how I solved it. Maxing packet...was the solution.
I use windows server 2008.
This was what I took advice from. http://groups.drupal.org/node/13844

Here is my research links and captured image.

aquadrop’s picture

Similar problem after installing and activating galleria module. Locale module seems to be the cause in this case:

PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: SELECT s.lid, t.translation, s.version FROM {locales_source} s LEFT JOIN {locales_target} t ON s.lid = t.lid AND t.language = :language WHERE s.source = :source AND s.context = :context AND s.textgroup = 'default'; Array ( [:language] => it [:source] => Configure how content input by users is filtered, including allowed HTML tags. Also allows enabling of module-provided filters. [:context] => ) in locale() (line 684 of C:\...\modules\locale\locale.module).

HappyJiyoung’s picture

When enabling migrate_ui I got errors as well.
Somehow locale module doesn't seem to go well...giving errors a lot...I had to disable this often. With i18n together...