Drupal

Additional uncaught exception thrown while handling exception – drupal

Problem

The description below is fine for a developer but leaves an ordinary user completely in the dark. They have no clue what they should do. In this case just hitting refresh fixed things. That is what ordinary users should see. Something like

System failure. Try refreshing the screen.
——————————
Additional uncaught exception thrown while handling exception.
Original

PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: SELECT source FROM {url_alias} WHERE alias = :alias AND language IN (:language, :language_none) ORDER BY language ASC, pid DESC; Array ( [:alias] => node/2 [:language] => en [:language_none] => und ) in drupal_lookup_path() (line 177 of /home/yktdan/public_html/includes/path.inc).
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:286:”SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: SELECT source FROM {url_alias} WHERE alias = :alias AND language IN (:language, :language_none) ORDER BY language ASC, pid DESC; Array ( [:alias] => node/2 [:language] => en [:language_none] => und ) “;s:9:”%function”;s:20:”drupal_lookup_path()”;s:5:”%file”;s:42:”/home/yktdan/public_html/includes/path.inc”;s:5:”%line”;i:177;s:14:”severity_level”;i:3;} [:db_insert_placeholder_4] => 3 [:db_insert_placeholder_5] => [:db_insert_placeholder_6] => http://www.danielsweb.info/ [:db_insert_placeholder_7] => [:db_insert_placeholder_8] => 108.21.188.154 [:db_insert_placeholder_9] => 1297532414 ) in dblog_watchdog() (line 155 of /home/yktdan/public_html/modules/dblog/dblog.module).
Uncaught exception thrown in session handler.

PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away in _drupal_session_write() (line 204 of /home/yktdan/public_html/includes/session.inc).

Solution

If you are using XAMPP..

Open my.ini
Search “mysqld”
Edit “max_allowed_packet=100M”
Restart MySQL.

 

If you are using MAMP..
Please follow below steps for resolving this issue.

1. Stop mysql service
2. Create a file my.cnf in conf folder of MAMP.
3. Put below code in the that

<span class="token punctuation">[</span>mysqld<span class="token punctuation">]</span>
max_allowed_packet <span class="token operator">=</span> <span class="token constant">128M</span>

4. Restart mysql service

Please try to increase the packet size if problem persists.

C
jhvf
C

Upload a Resource

Upload Game, Asset, Cource
Add Resource

Latest resources