Some times cron sticks on gathering of feed items.
For example when a feed owner site has dns problems and doesn't reply for requests.
In this cases, cron not works on the next scheduled time and for some hours hammers the server.
How can i prevent this?
Is it possible to write a hook for thresholding?

Comments

alex_b’s picture

Do you get similar problems when refreshing manually?

You may want to fire cron with drush:

/usr/local/bin/drush -r /home/my/public_html/mysite cron

[edit] - using cron with drush decreases the overall memory size Drupal requires + you are able to specifically tune your settings for PHP CLI apart from PHP's webserver configuration.

aron novak’s picture

It is possible to add timeout thresolds when downloading the feed. Which parser do you use?
http://us2.php.net/manual/en/function.curl-setopt.php - CURLOPT_TIMEOUT
However this should not happen. If there is something wrong with the internet connection, you can test it before firing cron.