1

My Drupal installation's cron runs fail when run manually or by cron script.

I thought it might be the Simple News module, but I've disabled then uninstalled that and the problem is still present.

My PHP max_execution_time is set to 120 seconds, but only takes 2 seconds before I'm redirected to domain.com/user/1/edit with no error message is displayed.

When I look in the dblogs I can see:

Message: Cron run exceeded the time limit and was aborted.
Severity: warning

I have looked in the Apache logs and no PHP error is given. How can I debug in fix this?

2

Often a drupal_goto() call in a page or module will be sending the execution of the cron run off course.

This often happens when the core Search module tries to index a page with such a drupal_goto() call. The solution is to find that page (or module) and remove the call, or change it so it doesn't fire during a cron run.

Try installing Elysia Cron to allow you to run each Drupal cron task in turn to work out what's causing the problem. From there you'll be able to debug it or look for ideas on the Drupal.org issue queue.

1

Usually it's a cron hook in just one of you modules that's causing the timeout. You need to find the problem module. This article: Drupal Cron Troubleshooting is one way to investigate this. Make a backup of module.inc so that you can undo the edit. If you aren't comfortable with editing this file, you could take the time-consuming approach of disabling all your contributed modules, running cron, enabling one module, run cron until you find the culprit.

A debugger is a better way to attack this, but you need to know how to use one.

-1

You can see Cron run exceeded the time limit and was aborted

If you have a nginx or any frontend server, it can make this problem.

  • 1
    Please don't post general discussion links as answers. There might be some useful information in there, but please take the time to extract and post it. Thanks. – Jim Kirkpatrick Dec 22 '11 at 17:28
  • Ok, i have understood – Dimmduh Dec 23 '11 at 5:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.