Akismet Plugin Causing MySQL Issues
Monday, July 2nd, 2007During the last several weeks, I’ve been experiencing problems with Bradsblog. Sometimes, the site simply won’t resolve and the sands in the hourglass flow forever. Other times, I can get on but cannot access the back end to perform administrative functions. After a few back and forths with Dreamhost support, and realized that the problem lies in the Akismet anti comment spam plugin. In order to resolve these issues, I had to edit the Akismet.php file by removing the following code from it.
$n = mt_rand(1, 5);
if ( $n % 5 )
$wpdb->query(”OPTIMIZE TABLE $wpdb->comments”);
Dreamhost will continue to monitor this and see if this fixes the problem.