0

I was working on website and suddenly noticed that a particular page had a error message and lost a lot of css styles.

When I went back to the back-end I saw a white page with following message and nothing else (no administration menu, no content overview, ...

Error message

Additional uncaught exception thrown while handling exception.

Original

PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: SELECT s.uid, c.updated FROM {ctools_object_cache} c INNER JOIN {sessions} s ON c.sid = s.sid WHERE s.sid <> :session_id AND c.obj = :obj AND c.name = :name ORDER BY c.updated ASC; Array ( [:session_id] => HWv-9jPhNMHqjMdxRprJh-YmmBQc2y0jWXrbR_68TeA [:obj] => view [:name] => article_4pc ) in ctools_object_cache_test() (line 145 of /home/admin/domains/peace-in-the-city.be/public_html/sites/all/modules/ctools/includes/object-cache.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:382:"SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: SELECT s.uid, c.updated FROM {ctools_object_cache} c INNER JOIN {sessions} s ON c.sid = s.sid WHERE s.sid <> :session_id AND c.obj = :obj AND c.name = :name ORDER BY c.updated ASC; Array ( [:session_id] => HWv-9jPhNMHqjMdxRprJh-YmmBQc2y0jWXrbR_68TeA [:obj] => view [:name] => article_4pc ) ";s:9:"%function";s:26:"ctools_object_cache_test()";s:5:"%file";s:103:"/home/admin/domains/peace-in-the-city.be/public_html/sites/all/modules/ctools/includes/object-cache.inc";s:5:"%line";i:145;s:14:"severity_level";i:3;} [:db_insert_placeholder_4] => 3 [:db_insert_placeholder_5] => [:db_insert_placeholder_6] => http://peace-in-the-city.be/admin [:db_insert_placeholder_7] => [:db_insert_placeholder_8] => 178.118.99.54 [:db_insert_placeholder_9] => 1426611072 ) in dblog_watchdog() (line 160 of /home/admin/domains/peace-in-the-city.be/public_html/modules/dblog/dblog.module).

Uncaught exception thrown in session handler.

PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: SELECT 1 AS expression FROM {sessions} sessions WHERE ( (sid = :db_condition_placeholder_0) AND (ssid = :db_condition_placeholder_1) ); Array ( [:db_condition_placeholder_0] => HWv-9jPhNMHqjMdxRprJh-YmmBQc2y0jWXrbR_68TeA [:db_condition_placeholder_1] => ) in _drupal_session_write() (line 209 of /home/admin/domains/peace-in-the-city.be/public_html/includes/session.inc).

I was able to login as another users without any problems. I flush caches and run cron and this have not solve my issue.

How can I troubleshoot this problem ?

You can find the website here.

  • Have you verified that MySQL is still running? It looks like MySQL stopped running. EDIT: I missed the part that said this is working for some users but not others. I would still try restarting the MySQL service, however. – rrr45 Mar 17 '15 at 17:06
  • I will try to check that, but if my website is working online (if not logged in) or you can login and flush cash with other user, the MySQL is working... NOT? -- Was also to fast :-) Wil try to restart my MySQL – Stan Kosmoseistis Mar 17 '15 at 17:09
  • Yes it would seem that MySQL probably is working, but this is weird and I'm not sure what else I would check. It might also be a memory issue perhaps? If restarting MySQL doesn't work, maybe try restarting Apache. – rrr45 Mar 17 '15 at 17:22
  • I have 12 other websites running on my VPS, so afraid to stop MySQL or apache myself, gonna call tomorrow to the hosting-company that suply me the VPS, and ask them for restarting... Or i restart with a backup... Thanks for replying so fast rrr45!!! – Stan Kosmoseistis Mar 17 '15 at 17:26
  • This message does not actually mean the MySQL server has gone down - it just means PHP did not get a response to the command within its timeout settings. Probable cause is that your server is overloaded / badly tuned for its usage. – Alfred Armstrong Mar 18 '15 at 11:20
1

To troubleshoot, add these lines to your settings.php:

error_reporting(E_ALL);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);

Once you add these, you should see some error output.

| improve this answer | |
  • dwcdev Thanks for the reply... Seems handy info for next time.. Because i did restart with a backup, no trouble messages for me today :-) Hopefully i don't need that info the coming days ;-) – Stan Kosmoseistis Mar 18 '15 at 13:26
  • Yeah, that gets rid of the WSOD issue. I always add those to settings.php when we start a new project. Be sure to turn them off when you roll out to production. – dwcdev Mar 18 '15 at 17:00
  • @stan - Can you click my post as answered, since it would solve your WSOD issue? – dwcdev Mar 24 '15 at 7:36

Not the answer you're looking for? Browse other questions tagged or ask your own question.