By kulfi on
I've just launched my site and haven't set up crontab yet, I've been running cron manually. I just received this message:
Cron has been running for more than an hour and is most likely stuck.
Help!?
I've just launched my site and haven't set up crontab yet, I've been running cron manually. I just received this message:
Cron has been running for more than an hour and is most likely stuck.
Help!?
Comments
Somebody?
Somebody?
Its still going ... help
Its still going ... help appreciated!
+1
+1
clean cron_semaphore
Try to "clean" cron_semaphore from your database:
It should help.
---
Drupal Themes Live Preview - themegarden.org
Still coming "Cron has been
Still coming "Cron has been running for more than an hour and is most ..."
Some other ideas how to detect module, which delays cron ?
What is result of next
What is result of next query:
If you find 'cron_semaphore' under field 'name', try query from my prev. post (REMOVE FROM ...), and than repeat this query.
After that, run cron.php manually.
Does msg "Cron has been running for more than an hour and is most ..." apear after first cron job (just after "cleaning" database)?
If yes, then I don't have any clue.
Otherwise, run cron (after 1st cron job is finished) again.
If msg still coming, than pls. give me next details.
What your web server's error log file says? Some errors, warnings ...?
What modules have you installed?
---
Drupal Theme Garden
wow...i had same problem...fixed...Drupal 5.1, GoDaddy
i managed to fix it by hacking common.inc. Line 1986 - get 'variable_get()' call to get the value of the semaphore variable - it was returning, according to the log file, the value '1187524663'.
how in the world could that happen?
so, to fix, i forced the '$semaphore' variable to FALSE (I had already tried deleting all 'cron%' entries from the db, and that did not work), ran the cron successfully through the admin menus, then removed my hacked code and now all is fine. i checked the return value of Semaphore now, and it comes back blank - when seems to be essentially correct, but i'm not too sure of that. confused about the max time of one hour and such.
the other unknowns in this mix are that i had just installed the 'Syndication' module and turned off the normal/built-in Node syndication. I also added a new feed for the News Aggregator - this new feed seemed to be giving some problems.
Still, getting that return value was really weird. And scary. The 'variable_get()' function seems to be a core part of Drupal...
I had the same problem
Hello, after setting my website in the new amazing 5.0 version I discovered that I had a really serious problem with the HEART of my website: cronjobs... After 4 or 5 times running normally it got stuck. I was almost going to 4.7 version (redoing all the work) when I discovered this entry. Thanks shmooth, apparently it works again. Only I hope that the problem won´t appear again. Did you experienced the problem again since you fixed it?
Thanks again :)
fixed and... fails again
Yes, I had to solve the problem twice more and this evening another one. The problem repeates once and again. This means that Dupal version 5.2 does not work?? Then, why it has been released?
:(
=-=
It's been released because it was tested and deemed working. I have no problems with cron on any of my sites using 5.2. Just because it is not working for you, in your environment does not mean it isn't ready. Drupal cannot be tested in all the possible environments, with all the possible combinations of modules in those environments before being released. Every piece of software , no matter how much QC is involved is released only later to find securiity problems and bugs.
I highly suggest setting up a test site and testing a fresh cron file. Then slowing working in any module sto see if there is a conflict. If there is there is the culprit.
_____________________________________________________________________________________________
give a person a fish and you feed them for a day but ... teach a person to fish and you feed them for a lifetime
More on this problem
Is there a fix for this problem? I'm running Drupal 5.1 and after deleting the cron% entries in the variable table in the database, I still have the error "Attempting to re-run cron while it is already running." and unfortunately, trying to add the line $semaphore = FALSE; on results in an error when I try to run the cron.php by hand.
Should I upgrade to 5.2? Is there any other solution to this problem? This seemed to crop up when I updated some modules - status_update being one of them but I've disabled it just to be sure.
Any input would be appreciated.
I'm not sure if this was
I'm not sure if this was stated or not but you have to delete the variables entry in the cache table as well as the cron_semaphore entry in the variables table. I was confused why It wouldn't work until I discovered this. After that just disable all contrib modules and the search module and enable them one by one, running cron each time, until you see the problem.
Shmooth's suggestion
Shmooth's suggestion worked wonders - putting
$semaphore = FALSE;
into the common.inc file. I ran once and took it back out, all is well. Thank you!
Tracing and Resetting Hung Cron Invocations
Here is a somewhat more sophisticated approach that will also allow you to trace out which cron hook is causing the hang to occur.
Please refer to the issue at http://drupal.org/node/779356 which I have just submitted.
This worked for me ..
Cleared cache and immediately ran cron.
memory usage
I had to increase the memory in php.ini from 32m to 64m. Other suggestions hadn't worked; that did.