In two installations of Drupal I have been forced to disable Update Notifications because with that module enabled, my site fails with a series of "MySQL server has gone away" errors. I initially installed 6.6 and it worked fine -- but upgrading to 6.8 caused the problem and it was repeated on a new clean install on another site. I've also upgraded one site to 6.9 and have the same problem. Below are a few of the error messages:

Warning: MySQL server has gone away query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (1, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:12:\"user warning\";s:8:\"%message\";s:86896:\"MySQL server has gone away\nquery: UPDATE cache_update SET data = 'a:13:{s:14:\\"advanced_forum\\";a:10:{s:5:\\"title\\";s:14:\\"Advanced Forum\\";s:10:\\"short_name\\";s:14:\\"advanced_forum\\";s:10:\\"dc:creator\\";s:8:\\"Michelle\\";s:11:\\"api_version\\";s:3:\\"6.x\\";s:17:\\"recommended_major\\";s:1:\\"1\\";s:16:\\"supported_majors\\";s:1:\\"1\\";s:13:\\"default_major\\";s:1:\\"1\\";s:14:\\&quo in /data/17/1/84/125/1736451/user/1875408/htdocs/includes/database.mysqli.inc on line 128

Warning: MySQL server has gone away query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (1, '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: UPDATE variable SET value = 'i:1232467900;' WHERE name = 'update_last_check'\";s:5:\"%file\";s:68:\"/data/17/1/84/125/1736451/user/1875408/htdocs/includes/bootstrap.inc\";s:5:\"%line\";i:509;}', 3, '', 'http://www.misite.com/admin/build/modules', 'http://www.mysite.com/admin/build/modules', '209.12.238.114', 1232467900) in /data/17/1/84/125/1736451/user/1875408/htdocs/includes/database.mysqli.inc on line 128

If it matters, I'm running on a Network Solutions hosting package.

Comments

j-b-m’s picture

Same problem for me. I cannot change the MYSQL config to try some tweaks, but in the last days, my site's admin pages became completely unavailable because I always had the "Warning: MySQL server has gone away query..." error page.

I disabled the "update status" module using phpmyadmin to alter the database, and the problem immediately disappeared. I think there is a problem in the way update status works...

Using latest 6.12 Drupal

dww’s picture

Version: 6.9 » 6.x-dev

I'm guessing this is caused by having a very large # of contributed modules enabled on your site, which causes the serialized array of available update data to be so huge that it overflows some mysql limits to the site of a record in a DB table, etc.

Probably the solution here is to split up the cached data so that we store available release data for each project in its own cache entry, instead of putting all of them into a single array and caching that in 1 record. This is related to some of the discussion in #238950: Meta: update.module RAM consumption, as well...

dww’s picture

In D7, I think this will be almost entirely solved once these two patches land:
#669554: Reduce RAM bloat: only save attributes from .info we care about
#669626: Reduce RAM bloat: split update status logic into a per-project helper and only save available release info we care about
However, there might be other ways to improve things so I'm going to leave this open for now...

sevanden’s picture

Version: 6.x-dev » 6.20

This issue apparently also exists in version 6.20

Is there any progress on this matter?

mattyoung’s picture

Does increasing the 'max_allowed_packet' config parameter to some very large value help?

DancingFoolVB’s picture

Version: 6.20 » 6.19

I had this problem a year ago for all my sites on SiteGround. Then it disappeared. But Christmas Day 2010, it came back. Sometime I get messages about SQL server going away, but usually update times out and all I get is a blank screen with the status of Done.

All I changed was to add one module (getid3).

A workaround is to have to windows open to the modules list with Update Status checked on one and not on the other. Then when the window goes away, I can submit the window with Update not checked and have a working site.

bleen’s picture

Version: 6.19 » 6.x-dev

Please do not change the version number ... this problem exists in the dev version of 6.x. If it is to be fixed, it will need to be fixed there. And if it is fixed (and committed) then it will be included in a Drupal6.21 (for example) release. You will then have the opportunity to update to that release and have your problem solved.

kreutzer’s picture

Hi,
I had the exact same problem (using 6.22). I fixed it by editing 3 lines in "/etc/my.conf"

1. max_allowed_packet=16MB (previously 8MB)
2. wait_timeout=100 (previously 30)
3. connect_timeout=30 (previously 20)

Hope this helps.

rares’s picture

Changing the MySQL server setting for max packet also did the job for me.

RoloDMonkey’s picture

Status: Active » Closed (won't fix)

I think this issue can be closed, since the documentation now recommends setting max_allowed_packet to 16M:

https://drupal.org/requirements/database