I noticed that my cron was reporting that it hadn't run in several days. The warning reported in log entries is "Cron run exceeded the time limit and was aborted". I -think- I have narrowed the problem down to Recommender API. Here are the steps I took to try and eliminate other possible causes.
1. After disabling Recommender API (and it's dependecies), cron runs without any problems.
2. I re-enabled Recommender API.
3. I removed and uninstalled all modules that depend on Recommender API, and the problem persists.
4. Running cron manually gives the same problem as a scheduled run, and the problem occurs in under 30 seconds.
5. To test the php timeout limit, I wrote a test page, and it successfully ran for several minutes.
From my log entries (oldest log at bottom), these are reported from running cron.
cron- Cron run exceeded the time limit and was aborted.
recommender- Invoking run_recommender. Might start a time-consuming process.
recommender- Recommender cron at frequency daily. Will run.
update- Attempted to fetch information about all available new releases and updates.
Another curious note is that after running cron manually with Recommender API, instead of stopping at the status page, it redirects to the Recommender API page.
I hope that this information can help. If I can provide any more information, please ask, I am very willing to take necessary steps to resolve this. thank you
Comments
Comment #1
Sepero commentedI have discovered that I do not seem to have any problems with cron if I comment out line #355 in file recommender.module
batch_process('/admin/settings/recommender');
Is this line necessary for the module to run correctly?
Update:
Ah, see that the line is necessary, as you are sending a batch_set of commands to be run. I will continue to explore and hope to hear back.
Comment #2
Sepero commentedAccording to what I've been reading, it appears that calling batch API may be problematic during a cron run.
http://svendecabooter.be/blog/performing-batch-data-operations-on-cron-r...
Comment #3
danithaca commentedCron has been reported to be problematic in previous issues. This will not get fixed in 6.x-2.0 release. The new releases 7.x-3.x and 6.x-3.x will fix this problem by outsourcing computation to Mahout. Please search the relevant issues.