Recently, we were notified by Dreamhost (the hosting service we're using) that this little blog is using more server resources than it should.
The reason it's an issue is that, well, I'm cheap. I'm not making money on this little blog (yes, we've sold a few Blog Ads, but not many; and no repeat business). Which means I've gone with a shared hosting plan.
Shared hosting means that the server that this little blog is running on is also the server that other blogs and Web sites are using. Shared hosting means just that. Many sites share a server. It's cheaper than having a dedicated server. Lots cheaper. So, we're sharing a server with others.
Each site that's running uses server resources. That's processing power. You ever noticed on your computer that if you have several browser windows open, your e-mail program running, your word processor (or Works) running, and lots of other stuff running that your computer may sometimes take longer to complete an action? If not, you're lucky. If so, that's probably because your computer's having a time trying to run all those applications at the same time. Its resources are being strained. Same thing with servers.
So, in order to keep that from happening on Web sites, each site (this little blog included) is allocated certain resources. Or actually, seconds of processing. And this little blog exceeds that total.
Now, if all the sites on the server did that, the server would bog down and nobody's site would be up. So, it's a problem. And I've got to work on it.
What that means to you? Maybe nothing. Maybe a lot.
The "inline TrackBacks" feature used on the mealtime posts is code I wrote. And I suspect that's where the problem is. There are plugins that others wrote that do the same thing. I suspect that, since they're actually programmers that do that stuff, their stuff is a lot more efficient.
So, I'm going to have to remove lots of that stuff. And start putting stuff back a little at a time. Until I find the problem. It's part of troubleshooting and it's a pain.
That means that until I get this problem fixed, the "inline TrackBacks" won't be working. And maybe some other stuff.
And I don't know how long this will take. So, if stuff looks funny, it's because I'm working on the site. I'll still be posting stuff, but I don't know how much. Once a day, to be sure. Maybe more often. But mealtime posts? I don't know. Headline News? If possible.
But, if the problem with server resources is what I think it is, I'm either going to have to find a more efficient method of using "inline TrackBacks" or I'm going to have to abandon that feature. And I don't want to do that.
But just like in real life, sometimes hard decisions have to be made.
I thought all along you were using Simply Kimberly's trackback plugin -- that's the one I use .. although you may have yours written to do something else in the background. Got my fingers crossed all goes well --
ReplyDeleteAs you know, I was having the same problems. I did (and am still doing) a whole lot of hacking to get rid of unneeded function calls, which helped pare down the CPU usage a little.
ReplyDeleteBut there's one thing I did which cut the usage in half, and that was edit the htaccess file to deny from certain referers. I noticed looking at the stats that I was getting hundreds of page requests per day with spammy URLs as the 'Referer.' These were robot-generated hits, not real visitors, but the server was treating them like real visitors and going through all the processing to send them the pages every time. I was getting about as many fake hits as real ones!
But now, the worst offenders (four or five URLs were 99 percent of the problem) get only a "HTTP 403 DENIED" response instead of a page. If you're getting a lot of referer spam, you should try that too. You get a huge payoff in CPU savings for only a couple lines of code in the htaccess file.
DreamHost has a page on this topic which you might find useful. You can e-mail me, too, if you need any help.
Jo: Yeah, mine only shows inline TrackBacks on "Open TrackBacks" and "Articles of Interest" categories. I did that to try to limit "add your post" links to posts designed for that.
ReplyDeleteSean: Thank you for the tip. I'm checking that now.
Sean makes a good point.
ReplyDeleteI have confronted similar issues wiht my host, eventually moving to a dedicated server. A big issue that we identified was the RSS feed. Every time anyone anywhere (who has your little blog on their RSS feed) refreshes, it hits your server. We never really solved this problem, I wish I could say we had.
But just keep in mind that your resource usage may just be "big," without any quick fix.
Commissar: I hadn't thought about the feed. It's 3.34% of requests, but I have no idea if that's high or low. I suspect low.
ReplyDeleteThe knowledge that there's not a lot I can do about it, other than cut it off, eases things. It's one rabbit I don't have to chase. Thanks!
Can't weigh in with any hack tips, but from a regular reader, the in-line tbs are a great idea and worth keeping. 2 cents. lgp
ReplyDeleteI know that most everyone likes all your meals. I, however, like your stories. Once a day stories or headlines are good for me...
ReplyDeleteI think you ought to do one meal a day.
Maybe brinnper...