I am currently receiving this issue when trying to create new accounts. When I go to create a new account, click submit, the page hangs for roughly 10 seconds, then displays a wall of errors. While the errors are listed, the request does go through and the account is made. I will also add that I just recently updated from Drupal 5 to 6
Warning: MySQL server has gone away query: INSERT INTO dru_watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:12:\"user warning\";s:8:\"%message\";s:145:\"Lost connection to MySQL server during query\nquery: DELETE FROM dru_cache_form WHERE cid = 'form_form-6a93c5e4f6b185aa886accecd71610f6'\";s:5:\"%file\";s:53:\"XXX/html/includes/cache.inc\";s:5:\"%line\";i:179;}', 3, '', 'http://www.houseofmarek.org/?q=user/register', 'http://www.houseofmarek.org/?q=user/register', 'XXX.XXX.XXX.XXX', 1204116917) in XXX/html/includes/database.mysql.inc on line 128
Warning: MySQL server has gone away query: INSERT INTO dru_watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:12:\"user warning\";s:8:\"%message\";s:130:\"MySQL server has gone away\nquery: DELETE FROM dru_cache_form WHERE cid = 'storage_form-6a93c5e4f6b185aa886accecd71610f6'\";s:5:\"%file\";s:53:\"XXX/html/includes/cache.inc\";s:5:\"%line\";i:179;}', 3, '', 'http://www.houseofmarek.org/?q=user/register', 'http://www.houseofmarek.org/?q=user/register', 'XXX.XXX.XXX.XXX', 1204116917) in XXX/html/includes/database.mysql.inc on line 128
Warning: MySQL server has gone away query: INSERT INTO dru_watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:12:\"user warning\";s:8:\"%message\";s:125:\"MySQL server has gone away\nquery: SELECT * FROM dru_menu_router WHERE path IN ('user') ORDER BY fit DESC LIMIT 0, 1\";s:5:\"%file\";s:52:\"XXX/html/includes/menu.inc\";s:5:\"%line\";i:316;}', 3, '', 'http://www.houseofmarek.org/?q=user/register', 'http://www.houseofmarek.org/?q=user/register', 'XXX.XXX.XXX.XXX', 1204116917) in XXX/html/includes/database.mysql.inc on line 128
Warning: MySQL server has gone away query: INSERT INTO dru_watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:12:\"user warning\";s:8:\"%message\";s:165:\"MySQL server has gone away\nquery: SELECT data, created, headers, expire, serialized FROM dru_cache_menu WHERE cid = 'links:navigation:page:user/register:1'\";s:5:\"%file\";s:53:\"XXX/html/includes/cache.inc\";s:5:\"%line\";i:26;}', 3, '', 'http://www.houseofmarek.org/?q=user/register', 'http://www.houseofmarek.org/?q=user/register', 'XXX.XXX.XXX.XXX', 1204116917) in XXX/html/includes/database.mysql.inc on line 128
Warning: MySQL server has gone away query: INSERT INTO dru_watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:12:\"user warning\";s:8:\"%message\";s:177:\"MySQL server has gone away\nquery: SELECT p1, p2, p3, p4, p5, p6, p7, p8 FROM dru_menu_links WHERE menu_name = 'navigation' AND link_path IN ('user/register')\";s:5:\"%file\";s:52:\"XXX/html/includes/menu.inc\";s:5:\"%line\";i:867;}', 3, '', 'http://www.houseofmarek.org/?q=user/register', 'http://www.houseofmarek.org/?q=user/register', 'XXX.XXX.XXX.XXX', 1204116917) in XXX/html/includes/database.mysql.inc on line 128
Warning: MySQL server has gone away query: INSERT INTO dru_watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:12:\"user warning\";s:8:\"%message\";s:165:\"MySQL server has gone away\nquery: SELECT p1, p2, p3, p4, p5, p6, p7, p8 FROM dru_menu_links WHERE menu_name = 'navigation' AND link_path = 'user'\";s:5:\"%file\";s:52:\"XXX/html/includes/menu.inc\";s:5:\"%line\";i:872;}', 3, '', 'http://www.houseofmarek.org/?q=user/register', 'http://www.houseofmarek.org/?q=user/register', 'XXX.XXX.XXX.XXX', 1204116917) in XXX/html/includes/database.mysql.inc on line 128
Warning: MySQL server has gone away query: INSERT INTO dru_watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:12:\"user warning\";s:8:\"%message\";s:180:\"MySQL server has gone away\nquery: SELECT mlid FROM dru_menu_links WHERE menu_name = 'navigation' AND expanded = 1 AND has_children = 1 AND plid IN (0) AND mlid NOT IN (0)\";s:5:\"%file\";s:52:\"XXX/html/includes/menu.inc\";s:5:\"%line\";i:886;}', 3, '', 'http://www.houseofmarek.org/?q=user/register', 'http://www.houseofmarek.org/?q=user/register', 'XXX.XXX.XXX.XXX', 1204116917) in XXX/html/includes/database.mysql.inc on line 128
Warning: MySQL server has gone away query: INSERT INTO dru_watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:12:\"user warning\";s:8:\"%message\";s:488:\"MySQL server has gone away\nquery: \n SELECT m.load_functions, m.to_arg_functions, m.access_callback, m.access_arguments, m.page_callback, m.page_arguments, m.title, m.title_callback, m.title_arguments, m.type, m.description, ml.*\n FROM dru_menu_links ml LEFT JOIN dru_menu_router m ON m.path = ml.router_path\n WHERE ml.menu_name = 'navigation' AND ml.plid IN (0)\n ORDER BY p1 ASC, p2 ASC, p3 ASC, p4 ASC, p5 ASC, p6 ASC, p7 ASC, p8 ASC, p9 ASC\";s:5:\"%file\";s:52:\"XXX/html/includes/menu.inc\";s:5:\"%line\";i:910;}', 3, '', 'http://www.house in XXX/html/includes/database.mysql.inc on line 128
Warning: MySQL server has gone away query: INSERT INTO dru_watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:12:\"user warning\";s:8:\"%message\";s:286:\"MySQL server has gone away\nquery: UPDATE dru_cache_menu SET data = 'a:2:{s:4:\\"tree\\";a:0:{}s:10:\\"node_links\\";a:0:{}}', created = 1204116917, expire = 0, headers = '', serialized = 1 WHERE cid = 'links:navigation:page:user/register:1'\";s:5:\"%file\";s:53:\"XXX/html/includes/cache.inc\";s:5:\"%line\";i:109;}', 3, '', 'http://www.houseofmarek.org/?q=user/register', 'http://www.houseofmarek.org/?q=user/register', 'XXX.XXX.XXX.XXX', 1204116917) in XXX/html/includes/database.mysql.inc on line 128
Warning: MySQL server has gone away query: INSERT INTO dru_watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:12:\"user warning\";s:8:\"%message\";s:316:\"MySQL server has gone away\nquery: INSERT INTO dru_accesslog (title, path, url, hostname, uid, sid, timer, timestamp) values('Home', 'user/register', 'http://www.houseofmarek.org/?q=user/register', 'XXX.XXX.XXX.XXX', 0, '8uf76tec8a03bvff9erc95vv53', 35794, 1204116917)\";s:5:\"%file\";s:71:\"XXX/html/modules/statistics/statistics.module\";s:5:\"%line\";i:64;}', 3, '', 'http://www.houseofmarek.org/?q=user/register', 'http://www.houseofmarek.org/?q=user/register', 'XXX.XXX.XXX.XXX', 1204 in XXX/html/includes/database.mysql.inc on line 128
Warning: MySQL server has gone away query: INSERT INTO dru_watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:12:\"user warning\";s:8:\"%message\";s:118:\"MySQL server has gone away\nquery: SELECT COUNT(*) FROM dru_sessions WHERE sid = '8uf76tec8a03bvff9erc95vv53'\";s:5:\"%file\";s:55:\"XXX/html/includes/session.inc\";s:5:\"%line\";i:65;}', 3, '', 'http://www.houseofmarek.org/?q=user/register', 'http://www.houseofmarek.org/?q=user/register', 'XXX.XXX.XXX.XXX', 1204116917) in XXX/html/includes/database.mysql.inc on line 128
Warning: MySQL server has gone away query: INSERT INTO dru_watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:12:\"user warning\";s:8:\"%message\";s:3961:\"MySQL server has gone away\nquery: INSERT INTO dru_sessions (sid, uid, cache, hostname, session, timestamp) VALUES ('8uf76tec8a03bvff9erc95vv53', 0, 0, 'XXX.XXX.XXX.XXX', 'captcha|a:2:{s:13:\\"user_register\\";a:1:{s:7:\\"success\\";b:1;}s:7:\\"success\\";b:1;}messages|a:2:{s:6:\\"status\\";a:1:{i:0;s:77:\\"Your password and further instructions have been sent to your e-mail address.\\";}s:5:\\"error\\";a:10:{i:0;s:229:\\"user warning: Lost connection to MySQL server during query\\nquery: DELETE FROM dru_cache_form in XXX/html/includes/database.mysql.inc on line 128
Warning: MySQL server has gone away query: INSERT INTO dru_watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:7:\"warning\";s:8:\"%message\";s:145:\"Cannot modify header information - headers already sent by (output started at XXX/html/includes/database.mysql.inc:128)\";s:5:\"%file\";s:54:\"XXX/html/includes/common.inc\";s:5:\"%line\";i:319;}', 3, '', 'http://www.houseofmarek.org/?q=user/register', 'http://www.houseofmarek.org/?q=user/register', 'XXX.XXX.XXX.XXX', 1204116917) in XXX/html/includes/database.mysql.inc on line 128
Comments
MySQL server has gone away is not a Drupal issue. Read on at:
http://dev.mysql.com/doc/refman/5.0/en/gone-away.html
Thank you for the information.
Deleted? It is here. We cannot do anything about this, because if you get "MySQL goes away" it is not a Drupal issue. Read on at the link I provided. No Drupal bug here.
From everything I read, it appears that it is a Drupal issue, because it is the Drupal mysql code that defines how it connects to the mysql database. Every aspect as far as timeout settings and so on is defined by Drupal when it accesses the database, Drupal sets the variables in how it connects.
At least this is how I read it when I looked into the information listed.
Once again I never had this issue until I upgraded to Drupal 6
Retitling. I still have the same opinion that this is not a Drupal issue, but this better title will at least allow others to come around and comment.
Cellarstudios: As Gabor previously mentioned, the page athttp://dev.mysql.com/doc/refman/5.0/en/gone-away.html has a long list of debugging options and possible causes. I believe that I have seen other issues or forum posts on drupal.org that mentioned this error in relation to the
max_allowed_packet
variable, discussed in bullet #7 on the page. You might try increasing that setting as described here:http://dev.mysql.com/doc/refman/5.0/en/packet-too-large.html.The issue I believe I am going to have is that I do not own nor can I control the actual server that is hosting my website. Currently I am hosted through Godaddy.com and they have disable certain functions that may be required from Drupal. The confusion I have is that before I upgraded to Drupal 6, Drupal 5 was flawless and I did not have any of the issues listed above.
So unfortunately I cannot alter any of the current settings on the server hosting the mysql database. Just trying to get a grasp on why Drupal 6 is giving me issues when Drupal 5 was not. I will also note, I ONLY get this this issue in the Create New Account portion of the site. Posts, comments, and any other form of submission to the website generates no errors at all.
So as far as size goesm I could hardly imagine the account creation portion to require an extremely large amount of space.
The two key phrases I keep reading about is this:
1. Is that the server timed out and closed the connection. By default, the server closes the connection after 8 hours or 28800 seconds if nothing has happened. You can change the time limit by setting the wait_timeout variable when you start mysqld via your server's /etc/my.cnf as well.
2. Another common reason to receive the MySQL server has gone away error is because you have issued a ``close'' on your MySQL connection and then tried to run a query on the closed connection. You can check that the MySQL hasn't died by executing mysqladmin version and examining the uptime.
The account creation portion does not "timeout" longer than the times listed above. Usually it gives me the error after 10 to 15 seconds tops. The other note regarding the closing of a connection on the query, so this leads me to believe its the code causing an issue by trying to execute something before something else is finished.
As I said. everything else is functioning as it was previously, this account creation is the only issue I am facing right now.
Cellarstudios: I'm not sure what the solution is either, but I'm thinking its not likely to be a general bug in Drupal since this problem does not occur systematically with other hosting providers. I did a google search for "godaddy server has gone away site:drupal.org" and there are several posts that may be related to your issue. I didn't scan through them though.
The same "MySQL server has gone away" error appears while updating feeds that have a long loading time with feed aggregator module. Please see:http://drupal.org/node/203326#comment-746922 and followups.
I'm not on godaddy, so that's not a godaddy specific issue.
The error in my case is that a function in drupal runs too long (or rather a feed, that has a long loading time). While loading this feed, the MySQL server closes the connection due to a connection time-out serverside set to 20s. After loading the feed, the aggregator module tries to update the database. This ends in lots of theses "MySQL server has gone away" errors.
Would be interesting to know if in Cellarstudios' case it's a time-out too or something else.
I found a workaround adding "mysqli.reconnect = On" to php.ini, but in my opinion that's not the way it should be solved.
In case of a time-out drupal should just reconnect to the database itself.
I have disabled the feed aggregator but that did not solve the issue as I feel it goes deeper than just the module. As I said I am hosted through Godaddy.com and they have made efforts to "hide" settings and files to keep things secure, so I do not have access to root site options and .ini files. I did find this thread on the subject, where other users are having similar issues, though they seem to be due to godaddy hosting (as far as making tweaks).
http://drupal.org/node/186384#comment-749202
Is there a work around for adjusting the timeout without accessing .ini files?
After many countless hours trying to resolve this issue, the only solution I have come across is disabling two modules in the base setup for Drupal.
Disabled:
Database Logging
Syslog
Either those two modules were conflicting, or the stress it was placing on my cripled Godaddy was causing an issue. These two modules may not actually be the issue, but they may be using more resources than what can be handled by the server.
Any ideas?
I have very similar problems - most of those seem to be related to Update Status module - as turning it off seems to get rid off those.
Didn't have problems with 5.x and contrib Update Status module.
And I wouldn't say it's Godaddy related problem as my projects aren't hosted there.. But anyway - I can't access .ini files either.
I think there are maybe two problems, which result in the same error:
Timeout (in my case): There I think it's a general problem of the drupal database connection handling. This error occurs as soon as a function runs longer than the db connection timeout setting (this may vary from host to host) without db interactions and the host turned of auto-reconnect. This can happen in every module. The solution could be a manual reconnect of the drupal db hanlder or where possible to set auto-reconnect in php.ini.
Large Queries: I'm not sure if this happens. But there may be too large queries by some drupal modules which exceed the query-size limit.
this problem is not just about 6.0. from a few days hunting, I find it appears just about anywhere.
I suggest anyone with this problem should first check with your webhost about wait_timeout setting for mysql. My webhost set it to 3 seconds at first! Now they have changed it to 8 seconds and my little drupal is ok!even with update status on!
In my case setting
mysqli.reconnect = On
in php.ini helped.I get the same warning messages with Drupal 5.7 installation, when I want to go into any admin page...
I was connecting with the host (Imhosted), and they tweaked the settings, but the warnings remained...
then they changed the php version back to 4.4.8 and all was working fine...
now they updated again to PHP 5.2.5 and the warnings appear again...
but every thing works even this warnings appear...
due I have no glue about code or programming, I dont know if this is a PHP problem or a MySQL problem...
My host set the PHP back to 4.4.8 and all is working fine again...
so I guess that this problem is about PHP 5.2.5