15th October 2007. That was the date when this blog was born. And it has just passed through its first Anniversary, quietly without a single post announcing it. Since then, blogging became like a second life for me and now I cannot imagine myself without blogging anymore.
In this one year, this blog has achieved moderate success and is getting about 3-6k pageviews daily.
This blog is live due to some excellent web hosting service provided by Lunarpages.
I had preferred a shared hosting plan from Lunarpages, just like most of the starters and at that time it had touted providing 15GB of web space with 1500GB of BW each month. This has now been increased to “Unilimited” web space and “Unlimited” Bandwidth.
Like most of the beginners, I was not knowing that this huge web space and huge BW is just a misnomer. No website can actually reach there, because much before reaching that point, you will be choked by another of the rider, which a beginner might never have anticipated.
All was going well, till three days back, when I was just preparing to renew my Web Hosting Account from Lunarpages, for another one year.
Suddenly, I found a mail from Lunarpages Support desk announcing that
…we found your account utilizing excessive resources, causing a significant degradation of services on the server.
Top Process %CPU 65.0 /usr/bin/php /home/webto1/public_html/index.php
Top Process %CPU 59.0 /usr/bin/php /home/webto1/public_html/index.php
Top Process %CPU 58.0 /usr/bin/php /home/webto1/public_html/index.php
Then they offered me to upgrade my account within a few days or face suspension of the account.
I took their concern seriously and the first thing I did was to install the WP-Super Cache plugin, which seems to be doing a fine job for many bigger blogs like QOT and many others. I also reduced a few php requests in my WP theme and contacted LP helpdesk, if it improved the CPU Load.
I received their response after one day, and it said that the load has reduced but it is still not within the acceptable limits.
Here is your resource usage for today:
CPU usage: 3.99
Memory usage: 1.99
MySQL usage: 0.2
Top Process %CPU 64.0 /usr/bin/php /home/webto1/public_html/wp-admin/theme-editor.php
Top Process %CPU 63.0 /usr/bin/php /home/webto1/public_html/index.php
Top Process %CPU 27.0 /usr/bin/php /home/webto1/public_html/index.php
Please note that the acceptable usage range for shared plans is 1.0% average %CPU or less, 1.0% average %Memory or less and Top Processes below 20%.
Then I contacted some of the wonderful people for advice, whom I have met on this wonderful world known as blogosphere. (One thing I find amazing about bloggers. Most of them like Keith, Abhishek, Rajesh, Madhur, Pavan, Haris, Les, Sid and many others are amazingly helpful people and really care for the relationships even for those who have never met them in person).
With their feedback, one thing was clear that the number of my visitors is not that big so as to raise a red flag for CPU usage. It may be due to some plugin causing huge CPU load or something else. A few of them even suggested that LP may be bullying me to purchase their VPS plan. I have heard after you sign up for their VPS plan, they also charge money for transferring your site to VPS and it is nothing less than extortion.
But without getting biased, I took the concern of my web host on its face value and carefully looked at all of the installed plugins. I found the following in my list.
- Adsense-Deluxe 0.8
- Advanced Category Excluder 1.2.3
- Akismet 2.2.1
- Adsense-Deluxe 0.8
- Advanced Category Excluder 1.2.3
- Akismet 2.2.1
- All in One SEO Pack 1.4.6.15
- AZIndex 0.6.2
- Dagon Design Sitemap Generator 3.15
- FeedBurner FeedSmith 2.3
- Google Analytics 2.4
- Google XML Sitemaps 3.1.0.1
- Hide Pages 0.1
- No Ping Wait 2.0
- Login LockDown v1.2
- Official StatCounter Plugin 1.0
- Post-Plugin Library 2.6.2.1
- Post Template 3.1.0
- Similar Posts 2.6.2.0
- Top Commentators Widget 1.0
- WP Contact Form III 1.6.2d
- WP Super Cache
- WP-Polls 2.31
- WordPress.com Stats
- WordPress Database Backup 2.2.1
Most of them looked to be innocent except WordPress.com Stats, Akismet 2.2.1, Google Analytics 2.4, WP-Polls 2.31, Official StatCounter Plugin 1.0.
I cannot live without Akismet and Google Analytics (Disabled and hard coded Google Analytics into the theme itself). And I also use StatCounter and WP-Polls. So, I kept them also. But WP Stats looked to be totally un-installable to me. And I just de-activated it.
Now I have just contacted LP to keep me informed about my stats.
I request my readers, visitors and friends, if they have any suggestions to make on what may be causing this huge CPU load. Your comments are invited.
PS.: Shared Web Hosting Plans are a classical case of “Overselling”. I am not blaming Lunarpages, because I suspect that most of the other web hosting service providers must be like them only. But still, I feel like saying bye-bye to LP, just in case I have to upgrade my account. I will consider to continue with them, in case the issue is resolved and they continue to host my blog on their shared hosting account.
Again your comments and suggestions are welcome.
Update 1:
Taking a cue from giedrius, I have disabled the Google Analytics Plugin and hard coded the code into the theme itself.
I am also uploading the screeshots of the settings of the WP Super Cache for comments, just in case I have made some mistake in the settings.
.
.
.
.
.
.
.
.
.
.
Update 2:
I just received mail from Lunarpages announcing that..
As of right now, your resource usage is:
CPU Usage 0.05%
Memory Usage 1.41%
MySQL Usage 0.0%
Top Process %CPU 0.2 /usr/bin/php /home/webto1/public_html/index.php
Top Process %CPU 0.1 [/wp-content/themes/The%20Gazette%20Edition/styles/darkblue/]
As the time now is 00:42 PST, what this means is that during the last 42 minutes, your scripts have used more than the allowed memory for a shared account.
They are still saying that the account is still not acceptable as the memory usage is higher.
One more thing I noticed that there are almost 50-60 Core Dump files in the root directory. The file name is something like core.12345, core.23456 and so on, and almost all of them are of same size of around 18MB. I guess they have been lying here for quite sometime.
File Type: ELF 32-bit LSB core file Intel 80386, version 1 (SYSV), SVR4-style, from ‘php’
Googling that, I came to know that these are binary files created due to some server crash and I am going to inquire Lunarpages about them. They seem to be meant for deletion at my end, but I will delete them after consulting Lunarpages.
Furthermore, on the advice of Michael VanDeMar, I am changing my expire time of Cache Pages to 6 hours (21600 seconds).
Hope these things bring some order.
Update 3:
While I was analyzing the log files of my Webalizer reports, I noticed that out of the Top 10 referring sites, 8 were from IP range 65.208.151.112 – 119. This was strange.
I had never come across this IP range.
On searching a bit, I came across a few more webmaster reporting unusual activities from the same IP range and some of them also linked them to an attempt towards a SQL Inject / Cross-site scripting effort. I do not know much about them.
The whois record also doesn’t reveals much about them.
I am contemplating blocking these IP ranges. What is your take?
Meanwhile I have also hard coded the StatCounter code into the theme files and disabled StatCounter plugin also.
Update 4:
Despite all these steps, and reducing the fat on the theme files, Lunarpages is contantly warning me about the high CPU load and memory usage.
Finally, I have decided to move away this blog to a VPS account, where I will have certain guaranteed memory, CPU cycles and bandwidth. The prime reason being that I cannot afford to remain this blog shut even for one day, because it will cost me more than what I will be paying in a month for my VPS account. After a little bit of research here and there, I have zeroed in on KnownHost, and moved it to their VPS account.
The transition was smooth like a breeze, with zero downtime, and within a matter of few hours, almost 98% of my traffic was being served from the new servers.
But, this incidence has surely made me learn a lot of lessons. I do not blame Lunarpages and would not go that far to claim that they were bullying me to upgrade my account. They might have valid reasons, although everybody has suggested that 3-5k visitors daily, with all unnecessary plugins removed and WP Super Cache Plugin performing to its optimum performance, should easily be within the limits of CPU Cycle amd memory usage. But still, I feel that as a host, they could have done a lot better in helping their clients to identify the cause of the problem, instead of repeating the same warnings again and again.
Thanks, for all the support and advice given by the visitors and friends through comments on this post as well as emails, which really had guided me to dig deeper and understand the process better.
Surely, I feel like I have grown a bit, alongwith my little baby blog, Webtools & Tips.
















November 15th, 2008 at 1:26 pm
Hi!. Its probably wordpress stats plugin(s), becouse they write to db a lot (probably each time a request is made to the site). Also, it is quite opposite to wordpress cache, as no mater if it caches pages or not, info is written to db.
Akismet SHOULD not rise loads much, as it uses network mostly, thus processor idles when plugin request info from akismet server.
Also, I would hardcode google analytics code in design, as it would be faster than loading plugin.
The plugin count itself might be an issue, because each plugin file is included when loading pages. Some of them perform (sometimes) useless actions when loading.
There are a lot of plugins that are written poorly. They are targeting small sites without visitors. So, take care.
November 15th, 2008 at 2:04 pm
Silki, I’m sorry to hear about your troubles.
I think I can probably fix this for you. 2 things…
First, is WP Super Cache actually enabled and configured? Not just the plugin activated, but Enabled in the Settings? This will cut down on a huge portion of your processor usage that is coming from real traffic from actual people.
Second, my guess is that the bulk of your actual processor usage is coming from spam bots, based on my personal experience with dealing with this. I can eliminate almost all of this issue for you. Please email me so I can walk you through what to do. If I’m right and it works for you (it did for me), I will blog about it as a how-to.
Peace.
November 15th, 2008 at 6:12 pm
@giedrius: Yes I do agree about WP-Stats. I have already disabled it and waiting for the response from Lunarpages about the results. Taking your advice, I have also disabled Google Analytics and hard-coded the code in the theme itself.
@Michael: Thanks for your help. I am uploading a few screenshot of WP Super Cache settings on this blog for your comments. Regarding your experience with Spam Bots, I have sent you an email and will post the findings on this blog for continuing the discussion here as well.
Thanks.
November 15th, 2008 at 9:04 pm
Silki,
I would up the expiration on the caches from an hour to at least 6 hours (21,600 seconds). I am replying to your email on the other bit.
November 16th, 2008 at 4:07 am
Hi
There is one other you can try if everything else fails – there is a WP database optimizer plugin – this will optimize your DB which can help to reduce CPU load.
Be sure to backup your DB first
http://wordpress.org/extend/plugins/wordpress-database-table-optimizer/
cheers – les
the radical blogger
November 16th, 2008 at 8:09 am
Even you can integrate statcounter code into your site coder, preferably header or footer.php and can disable statcounter plugin.
I don’t see any polls on your site. Do you need that plugin? – This may not cause much load as I can guess, but I don’t think its needed.
Statcounter has an option to block ip address. Why not google it for bad bot ip list and block all them. Also you may go through your akismet spam bot ips and that would be helpful for you.
November 16th, 2008 at 9:58 am
silki,
Michael may be right…Block all bots except those of google, yahoo and a few others from which you receive traffic…
November 16th, 2008 at 11:48 am
@Les: Thanks I will sure look into it. But right now the problem seems to be elsewhere.
@Pavan: I disabled the Statcounter plugin. And you can find WP-Polls running in a few interior pages.
@Rajesh: I am also thinking on the same lines. Michael has suggested some code to be integrated on .htaccess. Another writeup on the same topic is available here http://www.mapelli.info/blog/htaccess-hacking-for-fun-and-profit.
I am just evaluating my options.
Thanks for your advice.
November 16th, 2008 at 9:16 pm
Speaking about bots, the same can be done by using robots.txt besides banning the IP from .htaccess. I noticed that you’re limiting Googlebot’s crawling on your site but had not much workout on other bots.
Perhaps (I’m no expert here) blocking all bots except the well known ones help?
[blockquote]
# Googlebots, msnbots, yahoo, and Ask
User-agent: googlebot
User-agent: msnbot/
User-agent: searchpreview
User-agent: slurp
User-agent: Teoma
User-agent: yahooSeeker/M1A1-R2D2
# DMOZ/ODP, Verizon, girafa page thumbnailer, Internet Archiver
User-agent: Robozilla
User-agent: Verizon Superpages Web Crawler
User-agent: girafa
User-agent: ia_archiver
disallow:
# disallow all others
User-agent: *
disallow: /
[/blockquote]
Hope this helps.
November 17th, 2008 at 3:53 am
Well, banning bad bots should be done in .htaccess and not in robots.txt. all bots that check robots.txt are not too intensive and potentially bring visitors to your site. Bad bots dont bother on checking robots.txt.
Also, you should upgrade if you use older version of wordpress. Older versions are very inefficient. The database optimization plugin might work too.
November 17th, 2008 at 9:09 am
Good luck with this Silki. I think most owners experience this at some point and have to cut down on the usage of resources. I hope you have enough time before you have to pay for the account again.
November 21st, 2008 at 8:10 am
I can imagine with those amount of visits it will dig in to your account. Good luck with that.
November 28th, 2008 at 2:14 am
well siki wish you all the best. In my opinion you must consider your account before getting new.
November 28th, 2008 at 9:10 am
Have you looked into the ip address more? Like you say it is weird that with a blog of this size and that many visits that its a problem. I suppose now you have moved it is not necessarily a problem any more but still massively annoying. Some of the wp plugins can drain it down but I would have thought that it would have been loads better than that.
December 2nd, 2008 at 3:13 am
Thanks for the info.Wordpress has so many plugins that you can download for free.Most people want to customize their blog.This helps them better………….
December 7th, 2008 at 11:16 am
Thanks to Pavan (techpavan.com) I read this post of yours. I am facing exactly the same scenario, unfortunately my account has been suspended now, with no access to FTP server or anything else. I seriously think LP is bullying me to upgrade my site to VPS/DH. I cant help but wait for their email since the tech support guy washed off his hands saying only sysadmins can unsuspend my account
January 5th, 2010 at 10:47 pm
A very clever idea, will implement it as soon as possible. Found these informations worthy as i am new to this blog. Thanks a lot for sharing such an informative and interesting post with us. Keep blogging. Looking forward to reading your next post.
March 1st, 2010 at 11:55 pm
its nice to visit. try ahead………. like this ….