Drupal Tips: Cron Stuck

Jun 27, 2009 · by Tim Kamanin

Yesterday, I encountered the weird problem. Cron on one of my Drupal based web sites got stuck. I was checking my search index and realized that new content isn't being added to Drupal search database. Cron isn't launching and Database logger says that: "Attempting to re-run cron while it is already running". This is a common problem. So what should you do to fix this?

Try to make these simple steps (previously, backup your database):

  1. Go to your database via phpmyadmin and Truncate search_dataset and search_index tables. Clear them all, no mercy!
  2. Then, get into variables table and delete: cron_semaphor and cron_last variables.
  3. If steps 1 and 2 doesn't help, repeat them and clear all your cache_ tables. Sometimes it helps.

Hope this will help you to fix the problem and save up some time. Good luck!

Want to get more 🔥 tips like this one?

Subscribe to get notified about new dev tutorials