cron
I recently had a problem with cron on one of my Drupal sites, related to an issue I'll be posting about soon (namely, using Drupal's built-in search with more than 4.5 million entries in the search_index table). When I manually tried running cron, I got a "Cron failed" status message. I checked the log, and it said "Attempting to re-run cron while it is already running."
Apparently, something had messed up (probably due to the fact that I was messing with database tables while cron was working on them) with the previous cron job, and Drupal couldn't start a new cron job anymore. So, with the handy help of Google, I found part of a solution to my cron woes in the Drupal.org forums. Here's what I did to prevent this cron error from happening again:
- In PHPMyAdmin (you can also do this manually via the command line), delete the following rows from the variable table:
- cron_last
- cron_semaphore
- On your Drupal site, clear all the cache tables (If you have Administration menu installed, you can just click the "Flush all caches" link in the site-wide links menu).
As always, make sure you backup your database before you start deleting rows from it!
Now, cron is running without a problem again. There are some other issues I'm still having with cron, though, mostly related to the indexing of content via the built-in search.module. I'm working on fixing this problem, and right now am testing the use of InnoDB instead of MyISAM tables in MySQL to see if indexing goes any faster. (Thanks dmckenna!).