User login

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' *

Searched words: 
see what's causing cron jobs to fail

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <blockquote> <small> <h2> <h3> <h4> <h5> <h6> <sub> <sup> <p> <br> <strike> <table> <tr> <td> <thead> <th> <tbody> <tt> <output>
  • Lines and paragraphs break automatically.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.