To find out what is making a cron run very long (or failing)
A bunch of functions run when cron is run, to find out what is causing the overall run to take a long time (possibly timing out and breaking), you need to look at them piece by piece. This code does that:
http://drupal.org/project/drush_debug_tools
Code courtesy Tim Hilliard and tip courtesy George Cassie.
At the Boston Drupal meetup where this came up, i pointed out that with Poor Man's Cron in Drupal core for Drupal 7 can mean problems with cron (caused by a change 3 hours ago) could suddenly and subtly appear in page loads, with error messages from cron appended to the footer. The first symptom you notice may well be AJAX requests (as for autocomplete) no longer working, but throwing errors instead.
Best practice tip: Make sure a real cron is running.
Other tips: Search code base for error text, grep -ri 'error text here' *
Comments
Post new comment