Notes from the Woods

seeing · environment · exploration · photography

Excessive resources; return from banishment

Written by Mark

Born and raised in Detroit, c. 323 ppm CO2, Mark Graf is a Michigan photographer, naturalist, and diver whose muse is summoned by exploring the endless connections in nature; land, sea, and sky.

Thursday, July 5, 2007

So lately I have been pleased with the increased traffic on my site, I am making many more print sales and my site is turning up in Google searches on the first couple of pages. Traffic has actually more than doubled this year to date alone.

A couple of weeks ago, I got a rather strange email from my web hosting company stating they have filed a help ticket for me indicating ” Your account is utilizing excessive resources, causing a significant degradation of services on the server.” and they moved my site to a temporary server. It detailed that I had 7 days to fix this issue or my account may be suspended. Fortunately my site being on the temporary server was relatively transparent to visitors.

I was well within the bandwidth and storage space limits on my account. Barely tipping the scale actually. I had no clue at what to do with this. But anyone using a shared hosting plan and using a PHP driven blog or gallery, it could also happen to you.

Shared hosting plans are attractive because they are an inexpensive way to host a site. Thousands of companies offer plans near $10/month. Often they are marketed with gigs of bandwidth and more hard drive space than you can ever imagine filling up. But as I learned the hard way, there is a catch (isn’t there always?!) – even if you never hit your bandwidth or storage space limits. My understanding is that even without a lot of traffic, certain PHP scripts, or poorly written ones, can also cause you to have problems. It does not seem to be specific to my web host either. My internet searches for info showed this to be a fairly common practice.

With shared hosting plans you are sharing space on the same server with a lot of other sites. Each of those sites are usually allocated an even percentage of CPU use. Since we all share the same CPU, if my site is hogging more than my allocated amount – other sites on the same server may be slower than normal. It is kind of like running multiple programs on your computer, one may become a total resource hog and slow everything else down. So although I was a bit miffed this wasn’t laid out very clearly to me and I found out the way I did, I can actually understand the reasons. It sucks, but I understand it. It actually might suck more if this wasn’t monitored and one site ended up gobbling resources at the expense of 100 others.

I ended up deactivating all sorts of plugins that I had, changed my spam plugin from SpamKarma2 to Akismet, deactivated a stat plugin, and deactivated a thumbnail lightbox plugin in my coppermine gallery. I went back and forth for days on this because you don’t really know if one thing will put you back under, or if you need all of these things. Only the server admins can check resource use. All these deactivations reduced me some. I started at 4.46% and was down to about 1.9% now. The bogie was to be less than 1%. The math works out to make the assumption there are 100 sites on a server, each one allocated 1% of the CPU. But I was grasping at straws now, down to the bare minimum PHP use aside from deactivating the blog or gallery completely.

Speaking with one of the supervisors seemed to be going down the path of that my site was getting too much traffic to have PHP content and I might need to upgrade to a different kind of server. Not only did large $$$ start appearing in my eyes, but a VPS (Virtual Private Server) or a Dedicated server carry a bit more technical upkeep as well. Though having more visitors is always a nice thing to have – I wanted a deeper dive into who those visitors were before making any major moves like this. If it is justified, fine – I am willing to accept outgrowing a shared plan, but didn’t want to make the jump if it was some other cause. It was time to get into the statistics of WHO was visiting and from where. Many stat programs provided by hosts will give you breakdowns of what IP addresses are visiting your site the most and what files they are hitting the most.

Well, first off the bat, I tracked down one IP address that seemed to be visiting A LOT to my gallery, and it was from China. (You can do this with a WHOIS search on the IP address). So I banned that IP address. The hits were too many to be from a single visitor, and more likely some automated spider. The banishee now turned banisher! 🙂 The other IP addresses that were hitting my site like crazy were from Google. I like Google, Google is my friend. It is welcome any time.

But there are limits to all friendships! This is where looking at the files that were being hit the most helped. Many were PHP files from my gallery. This is where it pays to learn a little bit about the robots.txt file you can put on your site. You can visit here for background. It basically tells all the automated bots and spiders what they are not allowed to visit on your site. I wanted Google crawling my site, but did not need it to crawl everything. So I listed the urls to some of the larger PHP files from my gallery in this robots.txt file. Checking Google’s webmaster tools a day later indicated that these few lines in the robots file effectively prevented Google from running 2,000 + pages of PHP content. There are links in my gallery everywhere, so a spider can spend a long time there if left unchecked. My search engine rankings don’t seem to be affected, but it is something I’ll have to keep an eye on.

After updating my robots.txt file and banishing that one IP address, my CPU use came down to 0.64! So it showed me some of the traffic driving my PHP use up comprised of bots or spiders. So it seems keeping WordPress and Coppermine plugins to a minimum and using controls on automated bots that are visiting your site can make a big difference. I am glad I didn’t upgrade my plan unnecessarily. Technostress be gone, and let me get back to making images.

graf nature photo divider

this post is tagged with these subjects, you are invited to explore and wander …

Summer of Silence

Summer of Silence

As the 2024 Autumn Equinox approaches next week, I am trying to reflect on why I haven't made a post for what has essentially been all summer this year. It isn't unusual that summertime is generally my least "productive" time for photography. I found a post I had in...

read more
Calling into an empty field

Calling into an empty field

For a while now, I have been using a plugin called Subscribe to Comments that allows people to receive email notifications of replies they receive to the comments they leave here. This post is a mea culpa to those folks expecting them. As an administrator, I don't...

read more
Cloud Backup

Cloud Backup

Over the past few months, I have been migrating my cloud backup service which triggered more than a few headaches. I've been using CrashPlan for the longest time, resisting change because of the time it would take to upload to a different service. When I started with...

read more

Subscribe to Blog via Email

Thank you for spending a little bit of your day here. I truly appreciate it! Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Archives

Topics

I truly appreciate your comments and feedback!.   If you are commenting for the first time – welcome!  Your comment will be held in moderation until I approve it.  This is a courtesy effort to prevent any spam from going out to post subscribers.  No worries, once approved, it’s a one-time-only process.  You are then part of the cool folks who leave thoughtful comments on blogs.  🙂

7 Comments

  1. BoydGreeneArt

    Very interesting as I have just started on the internet and it can be a struggle at times. But I just persevere and learn all I can. Now I’m learning about writing and submitting articles which are supposed to be the number one way to increase your exposure on the net. I’ll see in my new challenge. Thanks for the article.

  2. JHB

    Very informative.
    Thanks for posting it.

  3. Ron Niebrugge

    Glad you got it worked out Mark!

  4. paul

    Mark, thanks very much for the detailed explanation. I am on a shared plan and I have created and uploaded my robots.txt file. I didn’t want to forget about it. I had read about robots.txt before, but didn’t pay it any mind. Now, after seeing what happened to you, I think that I should pay it some mind! 🙂 Thanks for sharing the information.

  5. Mark

    Dan – got it covered, thanks!

  6. Daniel Sroka

    Also be sure to create a site map, and register it with Google. It helps the search engines known what is important in your site. Here’s some background.