My shared hoster is continually disabling my site as it appears there is a run away plugin that is pegging mysql.
In their logs, I’m seeing these:
# Wed Jun 29 00:00:33 2011 # Query_time: 22.923943 Lock_time: 4.941786 Rows_sent: 100 Rows_examined: 808400 use FOO_wrdp2; SELECT * FROM wp_slimex_stats LIMIT 808300, 100 # Wed Jun 29 00:00:38 2011 # Query_time: 4.485267 Lock_time: 0.000093 Rows_sent: 100 Rows_examined: 808500 use FOO_wrdp2; SELECT * FROM wp_slimex_stats LIMIT 808400, 100 # Wed Jun 29 00:00:39 2011 # Query_time: 1.409544 Lock_time: 0.023081 Rows_sent: 100 Rows_examined: 808600 use FOO_wrdp2; SELECT * FROM wp_slimex_stats LIMIT 808500, 100
wp_slimex_stats mention and teh large query times. This is the part that’s raising red flags for my shared hoster.
wp_slimex_stats is indeed a table in my wordpress db but there is no such plugin installed or running on my wordpress blog. It also doesn’t appear to be a part of other plugins I have installed.
I’ve done a web search and can’t find much info at all on this plugin but it appears to be a logging plugin based on the columns I see in the mentioned tables (remote_ip, langugage, country, domain, referer, etc).
How in the world do I debug this to track down where the plugin actually is so I can disable it?
Sometimes plugins add tables to your database automatically when you install, but they are not removed when you disable the plugin. If I were you, I’d open my site in an HTML editor and do a global search for slimex_stats (or $wpdb->slimex_stats or wp_slimex_stats) to try to find where in your code that SELECT statement is being called. If your search yields any results, delete the offending code. Also, if you have access to the database, you could just delete or rename the table wp_slimex_stats. Once you do that, your PHP code in WordPress will start throwing errors indicating where MySQL is trying to run those SELECT statements and failing. You could then go to your code where the errors are occurring and delete the bad stuff.
Searching for wp_slimex_stats brings up references to a plugin called Wp-SlimStat-Ex – are you sure you don’t have that running? I also see lots and lots of DB errors on other people’s sites related to that table; maybe best not to use that plugin at all.