Hi,

I tried to change something in a template I had created and when I realized my changes didn't work, I undid them and resaved my file again. Now my page is loading very slowly and once i'm logged and I wanna click on Configuration to clear the caches (or any other admin link), i always get a server error 500. How can I get this fixed? I'm desperate!

Thank you!
Ron

Comments

cerr’s picture

Now I finally got the Configuration - Performance dialog but when I hit the "clear all caches" button I get this:

Additional uncaught exception thrown while handling exception.

Original

PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: SELECT fc.* FROM {field_config} fc WHERE (module = :db_condition_placeholder_0) AND (fc.active = :db_condition_placeholder_1) AND (fc.storage_active = :db_condition_placeholder_2) ; Array ( [:db_condition_placeholder_0] => number [:db_condition_placeholder_1] => 1 [:db_condition_placeholder_2] => 1 ) in field_read_fields() (line 353 of /home/content/66/9918066/html/modules/field/field.crud.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:390:"SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: SELECT fc.* FROM {field_config} fc WHERE (module = :db_condition_placeholder_0) AND (fc.active = :db_condition_placeholder_1) AND (fc.storage_active = :db_condition_placeholder_2) ; Array ( [:db_condition_placeholder_0] => number [:db_condition_placeholder_1] => 1 [:db_condition_placeholder_2] => 1 ) ";s:9:"%function";s:19:"field_read_fields()";s:5:"%file";s:58:"/home/content/66/9918066/html/modules/field/field.crud.inc";s:5:"%line";i:353;s:14:"severity_level";i:3;} [:db_insert_placeholder_4] => 3 [:db_insert_placeholder_5] => [:db_insert_placeholder_6] => http://inetgate.biz/admin/config/development/performance [:db_insert_placeholder_7] => http://inetgate.biz/admin/config/development/performance [:db_insert_placeholder_8] => 24.85.92.117 [:db_insert_placeholder_9] => 1352352236 ) in dblog_watchdog() (line 154 of /home/content/66/9918066/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 209 of /home/content/66/9918066/html/includes/session.inc).
John_B’s picture

The message boils down to one thing: "mysql server has gone away". So restart your mysql server (if your website is on your laptop). Call your hosting company or server manager if it is on a live server, and tell them to sort it out by increasing database server resources. Slow loading suggests poor quality server setup, so if you are on a remote hosting account I strongly suggest firing your supplier and hiring a Drupal specialist company, without delay. As you are keen for a fast solution I will name a couple, civihosting.com, hotdrupal.com. If the site is on your laptop, install a faster hard disk.

Digit Professionals specialising in Drupal, WordPress & CiviCRM support for publishers in non-profit and related sectors

cerr’s picture

Hi John,

Thanks for your reply. My website is in fact hosted with GoDaddy, url: www.inetgate.biz - due to their size, I don't think I can just tell them to upgrade their system... any other clues by any chance? Or is switching hosting what I should do now?

Thanks,
Ron

duckzland’s picture

if you are on shared hosting it would probably the size of the log is hitting the max sql packet size.

my best guess is by disabling the database log module plus emptying the cache table directly from phpmyadmin will work.

--------------------------------------------------------------------------------------------------------
if you can use drupal why use others?
VicTheme.com

cerr’s picture

Hi Duckland,

Thanks for your reply!
I'm with GoDaddy and the website is www.inetgate.biz - any clue how I can disable db logging with them? Also which cache tables should I empty, there's a whole bunch of including the following:

	drupal_cache		 		 		 	19	InnoDB	utf8_general_ci	1.5 MiB	-
	drupal_cache_block		 		 		 	0	InnoDB	utf8_general_ci	32.0 KiB	-
	drupal_cache_bootstrap		 		 		 	6	InnoDB	utf8_general_ci	128.0 KiB	-
	drupal_cache_field		 		 		 	12	InnoDB	utf8_general_ci	128.0 KiB	-
	drupal_cache_filter		 		 		 	2	InnoDB	utf8_general_ci	32.0 KiB	-
	drupal_cache_form		 		 		 	0	InnoDB	utf8_general_ci	32.0 KiB	-
	drupal_cache_image		 		 		 	0	InnoDB	utf8_general_ci	32.0 KiB	-
	drupal_cache_libraries		 		 		 	0	InnoDB	utf8_general_ci	32.0 KiB	-
	drupal_cache_menu		 		 		 	101	InnoDB	utf8_general_ci	1.5 MiB	-
	drupal_cache_metatag		 		 		 	30	InnoDB	utf8_general_ci	384.0 KiB	-
	drupal_cache_page		 		 		 	0	InnoDB	utf8_general_ci	32.0 KiB	-
	drupal_cache_path		 		 		 	14	InnoDB	utf8_general_ci	32.0 KiB	-
	drupal_cache_token		 		 		 	8	InnoDB	utf8_general_ci	256.0 KiB	-
	drupal_cache_update		 		 		 	22	InnoDB	utf8_general_ci	272.0 KiB	-
	drupal_cache_views		 		 		 	0	InnoDB	utf8_general_ci	32.0 KiB	-
	drupal_cache_views_data

Thanks!

John_B’s picture

You can safely empty (not drop / delete!) all cache tables. It is not usual to empty cache bootstrap I think, but it will do no harm.

If your server is so desperately bad (as GoDaddy may well be) that you have to disable db logging to get the site working, you have some more troubles waiting for you. But it might you get running. On bad quality shared hosting what often happens is that the database server grinds to a halt when people you are sharing it with are abusing it, then works well again when your neighbours stop abusing the server, so this problem is likely to come and go. A good shared hosting will go in, find the culprit, and suspend their account / website.

To disable logging you can go to Drupal's modules page and disable the Database Logging module. That will mean you will not have a record of error messages so I would not personally run a site that way, but in terms of getting the site working on inferior hosting, duckzland's advice is, as usual, good advice.

Digit Professionals specialising in Drupal, WordPress & CiviCRM support for publishers in non-profit and related sectors

cerr’s picture

I guess I'll use "TRUNCATE TABLE 'tablename'" to empty the cache, right?
I don't get through to my modules this time around, I keep getting a "500 Internal Server Error" :(

John_B’s picture

That will clear caches, and might well fix the server error too.

From command line you can alternatively install and use drush to clear caches, and disable modules etc. more quickly and easily than by using raw mysql commands.

Digit Professionals specialising in Drupal, WordPress & CiviCRM support for publishers in non-profit and related sectors

cerr’s picture

Well, seems like GoDaddy is on it - hopefully!
I understand you are inquiring about your inetgate.biz hosted site. Thank you for bringing this to our attention. We are currently aware of the issue and are working towards a resolution. Unfortunately there is not a known time frame in which this issue will be fixed but we are working towards the quickest resolution possible. We appreciate your patience while we look further into this matter for you.

duckzland’s picture

yes truncate them. and if you are still cannot get the site up to disable the dblog, you can look for system table in the database and search for dblog under the name column and set the value of the status colum to 0.

My 2 cents about godaddy:

Don't use their shared server for Drupal, save yourself from wasting tons of hours in fixing problem that shouldnt be occurring, Their VPS is ok though although in my personal experience is is a tad slower than mediatemple.

--------------------------------------------------------------------------------------------------------
if you can use drupal why use others?
VicTheme.com

cerr’s picture

Well, seems like they've figured it out and fixed it during the day today! :)

raven_web’s picture

Did you ever find out what they had fixed?