Additional uncaught exception thrown while handling exception.

Original

PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: SELECT * FROM {system} WHERE type = 'theme' OR (type = 'module' AND status = 1) ORDER BY weight ASC, name ASC; Array ( ) in system_list() (line 165 of C:\xampp\htdocs\lilsoak\includes\module.inc).

Additional

PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: SELECT t__0.* FROM {panels_layout} t__0 WHERE (plugin = :db_condition_placeholder_0) ; Array ( [:db_condition_placeholder_0] => flexible ) in ctools_export_load_object() (line 427 of C:\xampp\htdocs\lilsoak\sites\all\modules\ctools\includes\export.inc).

Uncaught exception thrown in session handler.

PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away in _drupal_session_write() (line 206 of C:\xampp\htdocs\lilsoak\includes\session.inc).

(Also get the same error on 7.x-3.x-beta2

Comments

Palantar’s picture

Just as a couple extra notes:

  • This is an otherwise perfectly working install of drupal. Omega works fine, nodes work fine, etc etc. No other Database problems
  • Let me know what other info you need to help debug it
Palantar’s picture

Debugger seems to indicate it is coming from :

$menus = menu_parent_options(menu_get_menus(), array('mlid' => 0));

in context_condition_menu.inc

Palantar’s picture

Alrighty, after at least 4 million google searches, this turns out to be fixed by setting the mysql my.ini packet size to much larger. I went from 1 MB to 16MB and it now works.

Palantar’s picture

Status: Active » Closed (cannot reproduce)
OldAccount’s picture

Thanks for this tip @Palantar! I just switched my local dev environment from MAMP to Mountain Lion's built in Apache with a local install of MySQL. I started getting this error whenever I tried loading any of my Contexts. Changing max_allowed_packet from 1MB to 16MB did the trick.

For anyone else that comes across this issue, be aware there are 2 instances of max_allowed_packet in the .cnf file, if you don't see your changes show up after restarting MySQL make sure you're not changing the mysqldump one. And if you're also using MySQL locally on a Mac, here's some helpful information on changing the config variables:
http://www.coolestguyplanettech.com/optimising-mysql-on-os-x-10-7-lion-w...

MihaiMiculescu’s picture

Issue summary: View changes

I second #5 !!!
It worked for me on a Win7 machine with Drupal over AMPPS.