Knowledgebase

Wordpress SQL Query Crashes Server .. Logged everything!

Posted by sOliver, 10-23-2010, 08:55 AM
Hi,I've got a problem and need some help. If you are familiar with administrating a server with wordpress+supercache you might know the problem. Problem: Some SQL queries crash my server on specific times. Starting at 8AM and then couple of times during the day. CENTOS 5.5 i686 WHM 11.26.20 Wordpress 3.01 Plugin: Wp-Supercache (Important) Since this problem occurred I've been logging everything. Time of occurrence: Starting at 8AM!! During night no problems. Then at 8AM EST mysql.slow.log is starting to log slow queries. This happened on two days in a row now starting at 8:02.04 and 8:04:36. SQL Queries I find a lot of the long queries in my database: SELECT SELECT Is there a trigger for the problem? Yes, I might be able to trigger it. This could be a coincidence, but a couple times now the SQL server crashed when I saved a Wordpress Draft. Apache Error Log at same time: Keep in mind I did not request that graceful restart. I disabled a lot of plugins and cleaned the wordpress_options table. However, I did not update ANY plugins and this worked for months, so why should it start making problems now? What troubles me is the fact that mysql.slow.log started to log slow queries over 1s at almost the same time for two days in a row? Coincidence? Someone exploiting a vulnerability? I am very grateful for any help or ideas how to solve this.

Posted by sOliver, 10-23-2010, 09:22 AM
I might have the solution, I am pretty sure. As discussed here the plugin Advanced Category Exclude is causing a lot of problems: http://osdir.com/ml/wordpress-hacker.../msg00237.html Although I haven't changed anything in months, I did post something and used the Advanced Category Excluder to exclude a post... This plugin might be causing all the problems. Looks like plugins can really cause a lot of trouble. At least my site is now blazing fast again. My tip: Clean out wordpress-options and disable ALL plugins that are not 100% required. Seriously, I will think twice about activating any plugin now.

Posted by plumsauce, 10-23-2010, 05:02 PM
The query itself is a monster. It *might* be accepted into production by a dba, but only under the most pressing circumstances and only after every avenue to avoid it had been exhausted. The problem with wordpress plugins is that not all of them are well written. Some enthusiast throws something together to achieve a certain personal requirement, and then publishes it. Others come along and grab it without any thought as to whether it might be good code.



Was this answer helpful?

Add to Favourites Add to Favourites

Print this Article Print this Article

Also Read
Another Sago Outage (Views: 637)


Language:

Client Login

Email

Password

Remember Me

Search