By gabble on
Cron seems to be stuck!
In the logs, at every hour: "Cron has been running for more than an hour and is most likely stuck."
When I manually attempt to run cron with http://[mydomain]/cron.php I get: "Attempting to re-run cron while it is already running."
/admin/logs/status: "Cron Last run 9 weeks 4 hours ago"
My ISP tells me cron is up and running...
The crontab line is:
curl --silent --compressed "http://[mydomain]/cron.php"
Any hints??
Thanks a lot in advance,
Gabriele
Comments
a search
searching on "Attempting to re-run cron while it is already running"...
http://drupal.org/node/160652 (heated comments aside) may have some clues that could help.
Unfortunately, the link you
Unfortunately, the link you suggested was to no avail, I tried to follow each "solution" proposed, but nothing changed, cron still stayed stuck.
This morning I have come across http://drupal.org/node/222073 and that seems to be the solution!
I disabled the update status module, and cron started behaving normally!
come to think of it, i
come to think of it, i encountered something like that. it turned out that update status was timing out. i extended max_execution_time in php.ini by 15 seconds, and end of problem. thanks for the reminder.
php_value max_execution_time
php_value max_execution_time is already set to 600
It seems a big number to me, do I really need to increase it some more?
Can I ask you how is php_value max_execution_time in your drupal installation?
Thank you.
600!
600 (10 minutes)! mine was at default (30), bumped to 45!
large and/or busy site? lots of modules (update status: if you run a check manually, does it complete?)? wondering if the settings for how many items indexed at a pass could be decreased a little, possibly increasing the cron intervals, a little? especially if you have a lot of other things happening (e-mail notices, cleanups, etc.).
Jan 2008 (awstats): Unique
Jan 2008 (awstats):
Unique visitors 36263
Visits 62203
Pages 210734
Hits 2404273
Bandwidth 16.69GB
=====
Core modules used:
Aggregator
Color
Comment
Contact
Forum
Locale
Menu
Path
Ping
Poll
Profile
Search
Statistics
Taxonomy
Throttle
Tracker
Upload
=====
Third-party modules used:
adminblock
adsense
autotimezone
captcha
cleanfeeds
comment_subject
db_maintenance
dhtml_menu
download_count
extlink
fcf
fckeditor
flag_content
i18n
jstools
logintoboggan
nodepager
nodeteaser
pagearray
panels
pathauto
pressflow_preempt
scheduler
similar
site_map
subscriptions
taxonomy_access
token
update_status
views
views_bonus
xmlsitemap
========
/.htaccess
...
php_value max_execution_time 600
php_value max_input_time 1200
php_value memory_limit 128M
....
========
apache 1.3.x, mysql 4.1.x, php 5.2.x on Mac OS X Server 10.4.x
Any advice??
random thoughts
don't see anything in particular that would trip you up. random thoughts:
- db_maintenance running at the same time as updates_status might be problematic under a worst-case circumstance.
- if you have subscriptions firing at cron, that might a contributor.
- aggregation/feeds might be something to look at.
- scheduler fires at cron.
- any cron at the same time as a large page-load might be a problem if there is a fight for cpu-cycles.
hmm, have you tried the devel module to look at loads and stuff, yet? it may give you some indicators, or verify the lack of.
you know, i did exactly what you did before i found my own solution; i disabled update_status, and re-enabled it to check for updates manually. it is a workable solution, just not automagic.
- db_maintenance runs every
- db_maintenance runs every night at 0:00, cron is set tu run every 45 minutes
- aggregator collects feeds from about 15 websites; I tried to disable it, to no avail, cron was still stuck
- subscriptions are sent every time a post is submitted, no cron here
- scheduler il seldom used, we used it only once and a long time ago
I tried to re-enable the update status module and I got all the problems expected.
Also, I didn't mention before, admin pages load without css and without sidebars:
here, here, and here
(the main site is http://www.musimac.it/ to get an idea of the overall look.)
When update status is disabled, the admin pages load as they should:
http://www.musimac.it/problems/4.png
went back and reread; was it
went back and reread; was it ever determined if update status ever runs to completion? even if run manually (from the status report or just getting into update status)? my own indicator was that it would not run to completion until i extended the time.
Actually, update status
Actually, update status seems to complete its job, because I do find indications on outdated or up-to-date modules.
But:
1) the update status page and most of the admin pages display is broken, as you can see in the 3 links above
2) the status report says "cron last run: 10 weeks and bla-bla-bla days ago"
3) when I manually run cron via the status report page or just http://www.musimac.it/cron.php I get: "Attempting to re-run cron while it is already running."
4) admin pages load sloooooowly
5) I tried to disable the aggregator, just in case... to no avail
When I disable update status module, everything works again, I mean: cron runs wihout issues in the logs, admin pages load with the proper site theme look, admin pages load faster, etc, etc.
well, back to your earlier
well, back to your earlier reply. we'll see if the open issue solves anything.
update module & stuck cron
Thanks to all who figured this out! It also worked for me -- cron running fine now.
Subscribing.
Subscribing.
.
--
( Evaluating the long-term route for Drupal 7.x via BackdropCMS at https://www.CMX.zone )
...
Additionally, use the MySQL database tools to check and if necessary repair your database. You may have something off a bit at a lower level. Also, from memory, if cron isn't completely finishing then it tries to finish on the next run. So, some potential random ideas that may or may not help....
(Oh, backups first, etc)
Clear your cache ( truncate from cache; I think )
Go through your aggregators and remove items and manually update them. Look for errors
-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide -|- Black Mountain
-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide
I have repaired and
I have repaired and optimized all mysql tables.
Also tried to disable the aggregator module.
The only thing I still have to try is to truncate the cache table. I'll let you know.
Thanks for now...
how did you repair?
hello,
I also have a stuck cron.php problem, and at the same time the website stay stuck and do not redirect people when they post a comment, what can I do ?
I know how to restart a cron that didn't finish by deleting Cron_semaphore in Variable table and emptying Cache table, but then, stuck again.
Thanks a lot.
Unfortunately I can't tell
Unfortunately I can't tell you much… I moved from my old ISP to a dedicated server (a debian linux box), and everything went smooth…
subscribing - exact same
subscribing - exact same issues. I've done the above steps (disable update_status, clear cache table and removed that variables entry)....and it still stays stuck.
Cron was Stuck: My Fix (YMMV): Stuck Again
I tried all the usual suspects:
----------------------------
Deleting the Cron Semaphor variable using Devel
Disabling Update Status Module
Reducing the Search increment to 10 (from 100)
Racheting back the Generic Path indexing
Disabling Search
Deleted the "Scheduled Backups" in the DB Backup Module (this was a wild guess on my part)
Plus a whole lot of wacky things that I'm not going to fess up to here.
What finally worked (AFAIK) was
1) Waiting for the time-out stuck message (not sure if this was necessary, but it happened around the same time.)
2) deleting the Cron_Last variable in addition to the Cron_Semaphor to trick the site into beliveing cron had never run.
I can now run Cron manually from the browser. I'm so giddy I could faint. (My site is going into production on Friday and Cron locked up on me four days ago after running fine for weeks of development.)
During all this error-checking, I got this error message from my server host's cron daemon. I've got my fingers crossed that it was an artifact of Cron being stuck and that next time it will run properly. If anyone else knows otherwise, this Drupal newbie would appreciate a pointer in the right direction.
-------------------------------------------
Looking up weavezinedev.com
Making HTTP connection to weavezinedev.com Sending HTTP request.
HTTP request sent; waiting for response.
Alert!: Unexpected network read error; connection aborted.
Can't Access `http://weavezinedev.com/cron.php'
Alert!: Unable to access document.
lynx: Can't access startfile
-------------------------------------------
Whew! Let's hope Cron stays unstuck. In any event, I sure learned tons about how Cron works tonight. Nothing like adrenaline to get all the synapses firing!
Edited:
Spoke too Soon
Cron is stuck again. Previous fix did not work. *sigh*
I will continue following this thread and searching around for other things to try.
Note, I moved my latest update on this issue (with more tech details) to a new topic Cron Stuck: Drupal 6 because I noticed this topic has Drupal 5.x taxonomy, and my issue is on a Drupal 6.9 server.
Logging Cron Really Helps
I added a Cron log to module_invoke_all and it helped me identify the module where cron was getting stuck. Details at: http://drupal.org/node/382682