WordPress is not the best optimized open source script (are there any at all?). Whether you are running a wordrpess blog with less traffic or getting millions of views per month at some point of time you will be affected by server overloading.
If you host your blog on shared hosting servers such as Bluheost then they will suspend your account.
If you have been hit by this problem then you will know better what I’m talking about.
I’ve been been advocating about getting a dedicated server and setting up your blog on it but it also doesn’t solve the overloading problem.
In this post I’ll try to describe how I managed (if at all) to solve overloading problem. Till date I’ve spent almost months, if not years, of time in investigating this issue and still I’m not going anywhere. There are no clear cut solution either. At the end you are left to the mercy of your own brain to sort it out. WordPress folks will not help as most of the time the overloading problem has nothing to do with WordPress core. Chances are that it is the plugin or the badly written theme which causes the problem.
Enough of introduction, now lets get down to the work.
1) PHP/mySQL debug
Instead of finding out which plugins are causing problem and delving deep into the theme go straight to the mysql slow query log and figure out which queries are slow. Just by looking at the queries you will find out the respective plugin. disable that plugin and wait n watch.
mySQL slow query log can be found in following log file:
/var/log/mysql/mysql-slow.log
The first culprit was Adrotate plugin which I’ve been using on many blog. This is very useful plugin but it seems I’ve to get rid of it if slows down server. The query related to Adrotate looks following
SELECT option_value FROM wp_options WHERE option_name = ‘adrotate_roles’ LIMIT 1;
Next I found following entries which are repeated number of times.
SELECT option_value FROM wp_options WHERE option_name = ‘smart_feed_email_enabled’ LIMIT 1;
SELECT t.*, tt.* FROM wp_terms AS t INNER JOIN wp_term_taxonomy AS tt ON t.term_id = tt.term_id WHERE tt.taxonomy IN (‘category’) ORDER BY t.name ASC;
Google for above didn’t show me any result. So I gonna need more time to find out what this query does.
Next SQL_CALC_FOUND_ROWS
Leave a Reply