If I update my update status, whether in cron or by running it manually, it often fails. This has been happening more in more recent days. I theorize that it has something to do with timing out while waiting for a response from drupal.org. I had to reload this page twice to even submit my support ticket because drupal.org didn't provide me styles on the first page load. I don't seem to have problems reaching other sites, drupal.org is just very slow. It took me over a minute just to load the issues queue page.

When I try to visit the update status page it spews pages of errors like the following, then fails to load:

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:475979:\"MySQL server has gone away\nquery: UPDATE cache_update SET data = 'a:52:{s:13:\\"advanced_help\\";a:10:{s:5:\\"title\\";s:13:\\"Advanced help\\";s:10:\\"short_name\\";s:13:\\"advanced_help\\";s:10:\\"dc:creator\\";s:13:\\"merlinofchaos\\";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:\\& in /home/hyperlo1/public_html/includes/database.mysql.inc on line 128

I had to install supercron and disable update status just to be able to run cron! Or, of course, I can disable the update status module entirely. Until recently I was at least able to make manual updates (it would succeed if not part of a cron run for some reason) but now that is failing too, and I cannot use the update status module at all. At least I've managed to get it to stop breaking my site. When a cron run fails due to this problem it leaves a semaphore behind and I have to go manually clear it before I can run cron again. This is unacceptable at best! Is this a problem with update status or with cron in general being broken by design?

Comments

UNarmed’s picture

Same problem here, update module is causing a delecious "Attempting to re-run cron while it is already running" error in log.

Lloyd’s picture

Ditto. Just started happening. Odd. Sorry I'm running D6, not D5.

UNarmed’s picture

I managed to fixed it, here are instructions.

This worked for me. http://drupal.org/node/382682

1. Track down which module is causing the issue with the code posted at the link, there is code for D5 and 6.
2. Disable module causing issue
3. Run this in database

DELETE FROM variable WHERE name="cron_semaphore";
DELETE FROM variable WHERE name = "cron_last";

4. Run cron manualy a couple of times.

Lloyd’s picture

Yeah that's a great tool. But does it help actually fix the problem for you? It helped me track it down to Update Status and another module which isn't critical. But how do we actually fix it so that Update Status works again?

UNarmed’s picture

Who knows haha cron was absolutely essential for me so i suppose sacarificing update status for cron seemed like a ok trade to me. If you do happen to stumble upon a solution, please let me know =]

gabiroba’s picture

I'm using drupal 6 and after disabling Update Module in core cron runs. I don't know if it is the main problem but I never got any of MY SQL has gone away without update module.

Hope this helps someone

M_Z’s picture

Title: Update status module won't update, breaks cron » Update status module won't update, breaks cron - MySQL server has gone away

I am using Drupal 6, too. And the described "MySQL server has gone away" came to me in the last night (without changing any code yesterday and without enabling new modules yesterday). So since last night my hourly cron run fails.

I found this helpful link: http://chrisshattuck.com/blog/solution-problem-mysql-server-has-gone-awa...

I see 2 possible causes:
a)
my web hoster (all-inkl.com) has lowered the "max_allowed_packet" MySQL server configuation parameter (current value is 16M).
OR
b)
the return value of the core Update status module request is now "bigger" than yesterday (e.g. new array keys or a more expensive formatting?)

So, with actived core update module:
Beside the cron problem the path admin/reports/updates also produces a lot of "MySQL server has gone away" messages, but after some page refreshs the update status cache is filled and it is working normally (cache expires after 1 hour). In this time the cron run is working, too (because the update_cron() has nothing to do, if the cached info is available).

Disabling the update module makes my cron working again. But so I miss module update information...

Maybe someone has similar problems and can report here.

M_Z’s picture

Update: I think that there is some limitation within PHP or MySQL configuration (maybe "max_allowed_packet" MySQL server configuation parameter, but maybe something else) of my web hosting company (all-inkl.com) in their shared hosting packages, that caused the problems which started some days ago and are still existing.

It seems that with every new release of any Drupal module the return value from the Drupal update server becomes bigger. And some days ago the return value reached some limit for my website (I have a lot of modules running in my installation and I have no problems with another D6-installation with less enabled modules that is running on the same server).