I'm currently having issues with my cron getting stuck sporadically (I am not using PoorMansCron) and disabling this module fixes it. I get the ever exciting "MySQL server has gone away" error, and it seems like is sticking and then sometimes resets itself (I set mysqli.reconnect = On in my php.ini which seemed to get the hourly cron to run successfully every 2 or 3 hours) . Before I disabled the module, I was able to run a manual back up with the Backup and Migrate module, and the cron did manage to run a successful backup of the database a couple of times through the scheduled backup. I can also successfully restore these database backups to my local environment.

My hosting provider recently upgraded MySQL from 4 to MySQL 5 (currently 5.0.67). I hadn't had any problems with my hourly cron that ran a nightly backup before the upgrade, but started having issues pretty much right after they did it, so I'm thinking that something happened there. I finally tracked it down to this module and it is currently disabled so that my crons run. I'm not sure about the details of what is happening, I just added a line to the modules inc (if ($hook == 'cron') watchdog('cron', "hit $module cron");) to see what the last module was that the cron hit. That is how I was led to this module. I did try disabling the module, which fixed the cron runs. I also tried removing all of the back_migrate entries in the variables table, and then tried re-enabling the module. I ran a manual backup and then let the cron run, which caused the same issue again. I have also already tried upping my resource-whatever in the php.ini according to some recommendations in the documentation (http://drupal.org/node/259580).

Does this problem ring any bells about things that I should try to resolve it? My hosting provider says that the database tables show no errors. Is the Backup and Migrate module compatible with MySQL 5? I really like this module and would appreciate any help. I miss it! Thanks.

Comments

ronan’s picture

I've never seen this myself. Maybe somebody else has run across it and can help.

I develop on MySQL 5.0.45 and have successfully run this module on a wide variety of environments, so they should be compatible. It's strange that it works manually but not on cron. Could it be a php timeout? What is your php timeout setting? Are there any PHP errors showing up in your httpd logs? If you have a support contract with your host they may be able to help you go log diving for issues.

Sorry I can't be more help on this.

Ronan

abowers’s picture

Thanks - I'll keep poking around.

I wasn't able to always run it manually, but sometimes, and it was running sometimes on the automated cron. The errors I am getting are in the format:

[17-Feb-2009 13:01:23] PHP Warning:  MySQL server has gone away
query: INSERT INTO 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:832:\"MySQL server has gone away\nquery: INSERT INTO system (name, info, type, filename, status, throttle, bootstrap) VALUES ('locale', 'a:10:{s:4:\\"name\\";s:6:\\"Locale\\";s:11:\\"description\\";s:119:\\"Adds language handling functionality and enables the translation of the user interface to languages other than English.\\";s:7:\\"package\\";s:15:\\"Core - optional\\";s:7:\\"version\\";s:3:\\"6.8\\";s:4:\\"core\\";s:3:\\"6.x\\";s:7:\\"project\\";s:6:\\&quo in /home/holacrac/public_html/includes/database.mysql.inc on line 128

But, I am getting enough of them across multiple tables that it seems like something is getting gunked up somewhere. It seems particularly weird to me that disabling the Backup and Migrate module fixes it, especially when the cron runs usually weren't running the scheduled backups. I doubt that it is the module causing the issue, especially if it is compatible with MySQL 5.0 and the issue doesn't ring any bells for you.

I'll post back if I'm able to figure something out. Thanks!

mdowsett’s picture

subscribing. I'm having 'cron stuck' issues as well...but I don't use this module. So maybe your issue isn't related to this module.

I'm desperately searching for a solution

abowers’s picture

Well, I'm not convinced that it is this module. I have disabled it for now, and am still having the same issue, though not as often. I haven't gotten enough data, yet, though to be sure. From what I've seen, there can be several reasons why you have this issue.

One thing that I found very helpful is this suggestion: http://drupal.org/node/123269#comment-644012, to help with debugging. Then you will see which modules were hit in your watchdog (Reports>Recent Log Entries), and try disabling it. I think in my case, I've got an overarching issue, but I'm still not sure what it is!

I've also tried some of the tuning described here: http://drupal.org/node/51263#comment-180220. Didn't work in my case, but it may help in yours.

abowers’s picture

As a followup to my original post for anyone else having issues: working with my hosting provider, I changed my cron job to use "wget" instead of "get" when running the Drupal cron (we tried several commands until settling on it), and everything seems to be working without error. Maybe there was something about permissions with accessing files or something. I've also upgraded Drupal since, so there may be magic going on there. My backups and the cron are now running happily, and I'm not really sure why, but it may be worth trying either of these two solutions.

ronan’s picture

Status: Active » Fixed

Glad you got this figured out. If anybody else is having this issue reopen the ticket.

Thanks
Ronan

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.