I recently enabled Akismet on a client’s WordPress site that had been running, and accumulating spam, for quite awhile.
Apparently there were so many spam messages (over 17,000!) that Akismet would hang with some kind of unreported out-of-memory condition. There was nothing in the log files to indicate what might be causing the error.
The result was a blank page with an address like:
http://www.example.com/wp-admin/index.php?action=akismet_recheck_queue
I was able to get Akismet filtering running by manually starting mysql:
$ mysql databasename -u dbusername -p
and then deleting all the very old unapproved comments:
mysql> delete from wp_comments where comment_approved = 0
AND comment_date < '2010-1-1';
You can see how many unapproved comments Akismet will try and filter:
mysql> select count(comment_ID) from wp_comments
where comment_approved=0;
and after Akismet runs awhile, you can monitor its progress by counting the number of messages flagged as spam:
mysql> select count(comment_ID) from wp_comments
where comment_approved='spam';
This completely resolved the problem.