Skip to content

Instantly share code, notes, and snippets.

@waako
Last active December 20, 2015 10:38
Show Gist options
  • Save waako/6116711 to your computer and use it in GitHub Desktop.
Save waako/6116711 to your computer and use it in GitHub Desktop.
MySQL has gone away error
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 2006 MySQL server has gone away' in /Users/waako/Dropbox/Sites/Contract/Tag1/ArchetypeMe/code/archetypeme/includes/database/database.inc:2139
Stack trace:
#0 /Users/waako/Dropbox/Sites/Contract/Tag1/ArchetypeMe/code/archetypeme/includes/database/database.inc(2139): PDOStatement->execute(Array)
#1 /includes/database/database.inc(664): DatabaseStatementBase->execute(Array, Array)
#2 /includes/database/database.inc(2318): DatabaseConnection->query('SELECT expire, ...', Array, Array)
#3 /includes/lock.inc(167): db_query('SELECT expire, ...', Array)
#4 /includes/lock.inc(146): lock_may_be_available('theme_registry:...')
#5 /includes/database/database.inc on line 2139
# I installed MySQL via homebrew, so you'll find my.cnf
/usr/local/opt/mysql/my.cnf
# at bottom of this file add
max_allowed_packet = 32M
# then restart MySQL
mysql.server restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment