Drupal Cron Run Failing and Timing Out
Category:
So I was trying to manually run cron.php on a drupal site, and it was timing out because the cron job couldn't finish. The cron job is quite intense, and I'm sure it isn't finishing because I am trying to run it during the day on a busy site. So in order to tell Drupal to forget about your last cron attempt:
- go into your drupal database
- go into the 'variable' table
- sort by the 'name' column ascending order
- look for any variable names beginning with 'cron_' and delete them
Here are some MySQL queries that should get the job done:
select * from variable where name like 'cron%'; delete from variable where name like 'cron%';
Or if you're captain cool, you can use drush:
drush vdel cron_last drush vdel cron_threshold_semaphore drush vdel cron_safe_threshold
Also, check out this post to see which modules that implement hook_cron may be causing the failed cron run.
http://millwoodonline.co.uk/blog/drupal-cron-failing-not-sure-why-heres-handy-drush-command