Hi

I was working away on Drupal earlier today and had just pressed Save, to enable the Pages module, and next thing my site crashed with the undernoted error. Now I can't log in as Admin at all - when I try to log in as Admin, the site just crashes with the message below. Also, the log in option curiously now does not appear on the front page, only on internal pages (odd!)

Clearing my browser's cache and cookies (I was working on my live site) gets my site up again, but I still can't log in as Admin. A new user can be created, though.

Re the error message, my database is still there (even though it says MySQL server has gone away). I am not sure how to interpret the rest of the message, however, as I am not sure of the programming processes involved. Could anyone please tell me if this error message is enough to suggest what is going on, because I have no clue.

Thanks.

Warning: PDOStatement::execute(): MySQL server has gone away in DatabaseStatementBase->execute() (line 2168 of D:\virtualservers\lfmevuzy\businesswebsitecentre.com\wwwroot\includes\database\database.inc).

Warning: PDOStatement::execute(): Error reading result set's header in DatabaseStatementBase->execute() (line 2168 of D:\virtualservers\lfmevuzy\businesswebsitecentre.com\wwwroot\includes\database\database.inc).

PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: SELECT filename FROM {registry} WHERE name = :name AND type = :type; Array ( [:name] => linkit_profiles_ui [:type] => interface ) in _registry_check_code() (line 3091 of D:\virtualservers\lfmevuzy\businesswebsitecentre.com\wwwroot\includes\bootstrap.inc).

Comments

dman’s picture

As it sort of says, the issue is that suddenly the code (Drupal Running as PHP under Apache) unexpectedly found itself unable to talk to the database (a MyQSL process *usually* but not always running on the same machine)

At this point, there are two places to start looking.
* The healthiness of your network connection to the DB server if not local.
* The healthiness of MySQL and your system/OS for performance otherwise.

Already we have moved away from anything specific within Drupal, its modules or its configuration. No module or configuration, however badly written, would be expected to trigger the 'MySQL server has gone away' message without trying really hard.
However tempting it is for a sysadmin to just blame the client code, 'MySQL server has gone away' is not one of those times.
It's not entirely impossible for code to trigger the error, but doing so means it's *exposing* a problem, not *causing* it - if you can convince anyone of that distinction.

It's *probably* just a scaling problem. Perhaps your MySQL setup is configured so it just can't deal with 250 queries at a time or something. Fixing this becomes deep fast, so it's either a case of talking with your sysadmin about that or reading a lot on performance tuning. The end result will probably be some experimental changes in "my.ini" and a restart. But this would be largely guesswork unless you also start with access to some performance monitoring logs and stats before you begin. 'my.ini' is documented internally, and MySQL ships with some alternative examples you can compare with also.
Perhaps there really is a bit of corruption in the DB (can't guess what) that means you should use MySQL admin tools to validate and repair the tables in your DB - see MySQL forums and docs for how to start on that, or poke around in whatever control panel you have access to.

campbdy’s picture

Well after a night's sleep [dreaming nasty Drupal dreams ;-) ] I tried one thing this morning and it worked straight off!

Before the crash, I had installed the Admin Menu module and things had seemed fine after that, albeit that on this install of Admin Menu, the Admin bar appeared a bit squashed (as if it was only taking up 3/4 of the line height) and the text was really small. I just ignored this as it was working and carried on working for a while until the system crashed. This morning, I just wondered if maybe Drupal/the database were caught in some endless loop to do with the installation of the Admin menu module that was tying up processor resources. So, as I couldn't still access the Admin area, I went into the file area on my server and simply deleted the Admin Menu module. And lo and behold, the original admin area is back and fine. I am one happy camper this morning.

Gonna try and install it again this morning (as I like it), using a fresh download of the Admin Menu module. Hopefully, it will be ok this time. If not, I know what to delete!

Thanks for your help.

Update: Installed it again and system crashed, as before. So, I deleted it and it is now working again. Really annoying, cos I like this module. Hmmm.