Drupal Tips: Cron Stuck

27 Jun · by Tim Kamanin · 1 min read

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!


Required for comment verification


A safer, simpler way is to go to the 'modules' page, and disable, uninstall and re-enable the module. It has the same effect, and clears (drops and recreates) all other search* table, too.

Reply · 8 years, 5 months ago