Thursday, July 30, 2009

Drupal Cron run failed

Very interesting situation. I love drupal (not sure why) even though if you add even a few modules the load time becomes snail pace. Also any sort of shared hosting environment and it can break down with database connect issues so it's a pain. Forget about getting even a dozen logged on users on a shared environment because depending on the modules... you will get booted out of your hosting provider. Enough complaining; done. Reason for this post is for my recent problem. I tried to run cron and it says:

Cron failed.

I tried to run it again and log says:

Attempting to re-run cron while it is already running.


Oh really? I'll wait a while and a few hours later I try again and get this message:

Cron has been running for more than an hour and is most likely stuck.

Well the server seems fine... not high load so I internet searched and the solution appears to be to disable the update status module. I ran cron successfully. I re-enabled update status module and ran cron again. Successful. Great. Problem solved. At least for Drupal 5.19

For Drupal 6.13 you will have to modify /modules/common.inc.
Look for Line 2637 and change $semaphore = variable_get('cron_semaphore', FALSE); to $semaphore = FALSE;

Remember to run cron and with success; revert the change.

1 comment:

  1. Thanks, this was the information I needed. Only, one little typo: the file is in /includes.

    ReplyDelete