Interferes with Cron
slinc - February 17, 2009 - 15:00
| Project: | Aggregation |
| Version: | 6.x-1.7 |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
This module causes cron to freeze, getting "Attempting to re-run cron while it is already running.".

#1
How can you tell it's caused by this module?
Many users are using it without problems.
#2
When I disabled aggregation, everything was fine again.
#3
Here is the error that is received: Cron run exceeded the time limit and was aborted.
I managed to hack cron to Prove that the problems are caused by this module.
Here is what a normal cron looks like, when the admin manually runs it:
cron 02/19/2009 - 17:56 Cron run completed.
cron 02/19/2009 - 17:56 hit subscriptions_content cron
cron 02/19/2009 - 17:56 hit webfm cron
cron 02/19/2009 - 17:56 hit subscriptions_mail cron
cron 02/19/2009 - 17:56 hit quotes cron
cron 02/19/2009 - 17:56 hit modr8 cron
cron 02/19/2009 - 17:56 hit kaltura cron
cron 02/19/2009 - 17:56 hit htmlpurifier cron
cron 02/19/2009 - 17:56 hit googleanalytics cron
cron 02/19/2009 - 17:56 hit backup_migrate cron
cron 02/19/2009 - 17:56 hit aggregation cron
cron 02/19/2009 - 17:56 hit update cron
cron 02/19/2009 - 17:56 hit system cron
cron 02/19/2009 - 17:56 hit statistics cron
cron 02/19/2009 - 17:56 hit search cron
cron 02/19/2009 - 17:56 hit poll cron
cron 02/19/2009 - 17:56 hit node cron
cron 02/19/2009 - 17:56 hit filter cron
cron 02/19/2009 - 17:56 hit dblog cron
cron 02/19/2009 - 17:56 hit birthdays cron
Here is what happens when an automatic crontab runs the cron:
cron 02/19/2009 - 18:00 Cron run exceeded the time limit and was aborted. Anonymous
cron 02/19/2009 - 18:00 hit update cron Anonymous
cron 02/19/2009 - 18:00 hit system cron Anonymous
cron 02/19/2009 - 18:00 hit statistics cron Anonymous
cron 02/19/2009 - 18:00 hit search cron Anonymous
cron 02/19/2009 - 18:00 hit poll cron Anonymous
cron 02/19/2009 - 18:00 hit node cron Anonymous
cron 02/19/2009 - 18:00 hit filter cron Anonymous
cron 02/19/2009 - 18:00 hit dblog cron Anonymous
cron 02/19/2009 - 18:00 hit birthdays cron Anonymous
Notice that it does not finish the aggregation cron, and thus terminates.
#4
It successfully goes through every cron before aggregation. When I disable aggregation everything is fine again.
#5
The reason is evidently one of the feeds or some other server configuration.
Are you sure you're server is setup to allow outbound connections? You need to test this to make sure it's not a firewall issue. You could try wget on an external feed URL and see if you're retrieving it correctly. If you are, you can exclude this cause.
Do you have a feed that's huge in size? I have never yet tackled this issue, but it is theoretically possible. Please disable all the feeds and run cron, I'm sure it will pass through the aggregation module without problems at all. Then perhaps enable one of the feeds that are known to you until you can home in on the problematic feed.
You could also just add a small hack to the _cron hook inside the aggregation module to know which feed is causing this.
#6
All feeds are working, and they are displayed. Unfortunately they are not updating anymore.
I believe this to be a performance issue with the module. What are the main advantages compared to the core aggregator module? I thought it was the performance boost.
Still, good job with the module, hopefully you can get this sorted out.
#7
This still happens when I uncheck the cron feature on the main settings. Very strange.
warning cron 02/19/2009 - 21:00 Attempting to re-run cron while it is already running. Anonymous
warning cron 02/19/2009 - 20:45 Cron run exceeded the time limit and was aborted. Anonymous
It seems to be freezing up cron.
#8
I'd like to see this module have a totally separate cron script that can be run separately from a normal cron maintenance task.
I've been having some problems with it too... Trying to update over 200 feeds... and along with a stockAPI update it times out quite a lot.
Separating the cron job from the rest would help a lot because as it stands right now it is going to check every time cron is run.
#9
I am also getting the "cron already running" messages, though sometimes it does run. Usually I have to wait ten minutes or so before I can run cron again manually via the status report page. I am using poormanscron in a multisite setup. Aggregation 6.x-1.8
Thanks very much for this module, by the way. It is much appreciated!
#10
Ref. #8:
"I'd like to see this module have a totally separate cron script that can be run separately from a normal cron maintenance task."
Second that.
#11
I've had the "Cron re-run" issue before and it was normally due to a shared hosting environment where the cron.php script was cut off because it was either taking too long to finish or was using more than the alotted amount of ram resource. I switched to a vps and cron was able to finish, though I've posted another issue where 6.x-1.8 does not purge old nodes unless run by a logged in user clicking on "Run Cron Manually" from the status report page.
#12
Do you have the PHP simplexml module installed?
This was it for me.
In function aggregation_get_XML in aggregation.module, the error suppression operator (@) before the simplexml_load_string function call will suppress the "undefined function" error message.