I get the following error in my Drupal, when I'm trying to do anything for Main menu. Trying to Add a link to it.

The db is a MySQL on localhost. Drupal works otherwise fine, but now suddenly this with Menu.

Additional uncaught exception thrown while handling exception.

Original

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] => fi [:source] => Configure how content input by users is filtered, including allowed HTML tags. Also allows enabling of module-provided filters. [:context] => ) in locale() (line 720 of /usr/share/nginx/service/modules/locale/locale.module).

Additional

PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: INSERT INTO {watchdog} (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8, :db_insert_placeholder_9); Array ( [:db_insert_placeholder_0] => 1 [:db_insert_placeholder_1] => php [:db_insert_placeholder_2] => %type: !message in %function (line %line of %file). [:db_insert_placeholder_3] => a:6:{s:5:"%type";s:12:"PDOException";s:8:"!message";s:495:"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] => fi [:source] => Configure how content input by users is filtered, including allowed HTML tags. Also allows enabling of module-provided filters. [:context] => ) ";s:9:"%function";s:8:"locale()";s:5:"%file";s:61:"/usr/share/nginx/www.example.com/modules/locale/locale.module";s:5:"%line";i:720;s:14:"se...} [:db_insert_placeholder_4] => 3 [:db_insert_placeholder_5] => [:db_insert_placeholder_6] => https://www.example.com/admin/structure/menu/manage/main-menu/add [:db_insert_placeholder_7] => https://www.example.com/admin/structure/menu [:db_insert_placeholder_8] => 127.0.0.1 [:db_insert_placeholder_9] => 1470926677 ) in dblog_watchdog() (line 163 of /usr/share/nginx/service/modules/dblog/dblog.module).

Comments

VM’s picture

http://dev.mysql.com/doc/refman/5.7/en/gone-away.html

be sure to read through the comments at the bottom of the MySQL documentation.

jarif’s picture

Thanks. Got it fixed by that page.