I've been working on some cron troubles for the past two months on http://stlouisreview.com/ . Basically, I often get "Cron run exceeded the time limit and was aborted." when my crontab script runs (using the following syntax: /usr/bin/wget -O - -q -t 1 http://stlouisreview.com/cron.php).

If I am logged into the website, and click on 'Run cron' in the Admin menu, or type in stlouisreview.com/cron.php, it runs without a problem, it just takes a little while. There are a ton of nodes on the site, causing search indexing to be slow, but even when cron runs successively without new nodes added/updated, cron starts erroring out after maybe a day or so.

I also disabled some of the ed_classified cron functions I didn't need, because they were slowing cron down as well. But cron always works when run manually, and often not if run through crontab.

Comments

blueflowers’s picture

AFAIK, you can't point cron to a URL in that fashion. It should be the path from the server root to your cron script

So this line:

/usr/bin/wget -O - -q -t 1 http://stlouisreview.com/cron.php

Would be something more like:

/usr/bin/wget -O - -q -t 1 /var/www/site/cron.php

Depending on your path.

I did dig up this older post for you though, hopefully there is more insight there

http://drupal.org/node/123269

Gary Feldman’s picture

That's not correct. The URL isn't being passed to cron, but to wget, which expects a URL. The original wget command is fine.

The post you dug up does have some useful information on diagnosing cron jobs that exceed the time limits.

geerlingguy’s picture

That's what I was thinking, as it works fine on all the other (12 or so) Drupal sites I set up, and was working on this one until the search_index table grew to be a few hundred MB beast!

Would it be better to have cron set up to run php /path/to/drupal_site/cron.php?

__________________
Personal site: www.jeffgeerling.com