Servers Part II: What is wrong? Or not fixed yet!

OK, I was just checking my logs again today after seeing a couple of odd spikes in activity in the last few hours. I have now decided to bite the bullet, and turn off the plugins en masse, except for three base plugins: PXS Mail Form, wp-cache, and my TLA plugin.

Other than that, they’re all going off. Since this is a blogger’s blog, and some of you have interest in WordPress, hosting and whatnot… I’ve decided to share EVERYTHING about this problem…

To those of you who are wondering what is wrong… please read yesterday’s post. In summary, one or two of my plugins are causing the server unnecessary work, and I still haven’t found what one it is.

——-
For more articles on running a business, making money, cutting debt, or creating your blog, subscribe to the RSS feed or email newsletter. There’s a lot more in the Random Walk to Wealth on InvestorBlogger dot com. Subscribe TODAY!
——-

Here’s the list of plugins that I currently have, but since this has been an on-going problem since September, I’m beginning to wonder whether an upgrade in PHP by my host actually started the problems then.

I’ve installed and am currently using these plugins:

  • All in One SEO Pack 1.3.8.4 – Out-of-the-box SEO for your Wordpress blog.
  • Dashboard Editor 0.2 – Allows you to customise the dashboard. By Aaron Harun.
  • **Feedburner Feed Replacement 2.2 – Forwards all feed traffic to Feedburner while letting through some important User-Agents.
  • **Feed Footer 1.1 – Add custom footers (copyright, notices, advertisements) to the bottom of your posts in your RSS feed.
  • Flash Video Player 2.0 – Simplifies the process of adding video to a WordPress blog.
  • Lighter Admin Drop Menus 2.3 – Creates Drop Down Menus for WordPress Admin Panels, just like Andy Staines’ original plugin, but without background pictures and special fonts.
  • *PXS Mail Form 2.6 – Creates a mail form with multi part verification, various messages and an auto redirect on successful send.
  • ***Related Posts 2.04 – Returns a list of the related entries based on active/passive keyword matches.
  • ***Shylock Adsense 1.2 – Insert Adsense code in your pages without modifying the template.
  • **Spam Karma 2 2.3 rc3 – Ultimate Spam Killer for WordPress.
  • SRG Clean Archives 4.2 – This plugin is designed to display your archive listings in a clean, uniform, single-query fashion that’s Search Engine friendly on a dedicated page or in your sidebar.
  • Submit It Plugin 1.0 – This plugin lists popular blog aggregator and feeds submitter.
  • *Text Link Ads 3.0.6 – Really Simple Web/RSS Advertising For Personal or Commercial Use.
  • *wp-cache 2.1.2 – Very fast cache module. It’s composed of several modules, this plugin can configure and manage the whole system.

I’ve had others, as well, but gradually had to whittle those away to get a base set. And these were my newest plugins.

  • Link A Dink 1.8 – Replace strings with links (or other words I guess) to help replace targeted keywords with new text.
  • obsocialbookmarker 4.0 – Add social book mark icons and links at the bottom of each post. I intended this to replace Submit It Plugin.
  • OIOpublisher Direct 1.31 – Allow direct purchasing of paid posts and text links via Wordpress, stop giving away commission to the middle-men! This plugin desperately needs updating now!

I will be turning on the most important ones as soon as I know if the base-3 are safe or not. That should be over the next 48 hours.

Then I will turn the plugins on every OTHER day, until I can determine where the problem lies. Of course, if I cannot still find the problem, then I’ll have to conclude that the problem lies within an interaction of different plugins.

Wish me luck.

Who put that spoke in my server? Or how to bring a server to its knees!

The last few months since getting my own private hosting have been quite challenging in a number of ways as I have had to adapt my handling of my sites to a number of new contingencies: including weird spikes in server activity. It’s been quite a learning experience, but I’m pretty sure I don’t want to go back to regular shared hosting! I love having my own server on Dreamhost…

——-
For more articles on running a business, making money, cutting debt, or creating your blog, subscribe to the RSS feed or email newsletter. There’s a lot more in the Random Walk to Wealth on InvestorBlogger dot com. Subscribe TODAY!
——-

This graph is taken from December 5th and shows four significant spikes in server traffic in the previous 24 hours, with the spike around 00:00 being the largest and also bringing the server down!

4-10am-5th-09h december

Dreamhost helpdesk have VERY helpful to me over the years, and patiently answered almost every query fully and in detail. The last few times though have been frustrating because the amount of activity has been quite high on occasion (without obvious justification either!), and they were suggesting that perhaps I should raise the allocation of resources (and the cost!) to cover the spikes! Now, I’d already tried this once or twice: having raised my basis from $15.00 to $20.00 to $30.00. While this did indeed improve my server responsiveness, I was still getting server outages every day about once or twice a day, and it just didn’t seem that my server traffic justified that!

What is a poor server to do?

Go on a bug hunt! It’s that simple. I decided to find out what was going on, and see if I couldn’t eliminate all the other possibililties before increasing the expense further…!

Step 1. Find the Crap…

I was amazed how much crap had built up on my servers over the three years I’ve been using Dreamhost hosting… It was actually quite shocking. And it took me days to clear. But first I took stock of the files and data that were on my server: html files, jpegs, mp3s (not many), php, applications, data, backups, gzips, etc… Once I determined which domains and subdomains were only serving files, I could eliminate those pretty easily. Then I went on a hunt for old PHP applications, principally old versions of WordPress, Galleries, etc..

Step 2. Three Choices: Choose NOW!

On finding an application, I was faced with three choices: upgrade the software to the current version; remove the software entirely; or password the entire directory. In most cases, I chose the second option to cut down on the security risk. On one or two occasions, I passworded entire subdomains (with .htaccess and .htpasswd files) as well to provide access to these applications only to the person concerned. In the cases of my primary websites, upgrading became mandatory. In rare occasions, I moved applications to the root directory as a stop gap measure.

From now on, though, I’m going to be much stricter on removing old applications because of the potential security problems that can be hidden by forgotten software.

Step 3. Deleting unnecessary plugins and themes

Since most of my blogs run versions of WordPress 2.2+ and I usually auto-install or auto-update the files (courtesy of Dreamhost’s great service), the process is quite quick and painless. Dreamhost have gotten it down to a fine art, such that upgrading involves backing up the Database, Turning off the plugins (one click), click update, and wait for confirmation. But each and every time I update Dreamhost creates a backup of the original files named domain.old, and throws in EVERY theme they can get their hands on with each install). This leads to a lot of stuff each time. So I usually now delete 95% of the themes, and maintain a lean installation with as few plugins as possible (and none spare). This helps make WP as responsive as possible.

But as you can see I was still getting server spikes, and my options were running out. Everything was eliminated in one way or another, and the server was still coming down. So what next?

Step 4. Is it time to ‘log’ out?

I compared the performance of my main blog with several other blogs by checking the error.logs (I had never checked these before) just to see what was going on. Surprisingly, I found the logs quite detailed (they’re in your FTP folder called ‘logs’… click through to your domain to find the logs and then look for the error logs. They were dated a couple of days back so I had to check through and this is what I saw:

errorlogs

That’s right, line after line of the same error: this read “(12)Cannot allocate memory: couldn’t spawn child process: /dh/cgi-system/php5.cgi” and “(12)Cannot allocate memory: couldn’t create child process: …” To make sure that I wasn’t just reading regular errors, I queried it on Google and got nothing, then I checked the logs of Wordpress Sites that I had just started with no themes or plugins. Sure enough, everything looked fine. Then I remember something a Dreamhost engineer had said:

Just the other day, I was dealing with a fellow who had a wordpress blog who was almost instantly crashing his PS with a single hit, because he had some wonky wordpress plugin which was spawning hundreds of php.cgi processes. Jeff

Well, thanks, Jeff. That has proved to be the best advice I’ve received yet… So I’ve been testing different plugins to find out which one or ones have been causing the problems. The best way to do this is to simply turn off all the plugins to restore the neutral state and then turn them on singly and checking the error log to eliminate those that don’t create the problem. I think I have a culprit already, but I’m now double checking them to make sure that I don’t blame the wrong plugin. Think ‘sticky’…

While the testing goes on, please excuse me for having unstable features on my blog as I try to eliminate the problem. But as you know, this problem has been going on for months; and this represents my best hope to get to the root of the problem.

Have you had these problems? What happened? I am not particularly an expert, but I was surprised at how much I could figure out by myself!

19″, 22″ or 24″: how big is your LCD monitor?

After yesterday’s super long post, I’m going to keep things much shorter and sweeter today. … There are actually two major computer shows in Taipei every year. The first one, everyone knows is Computex. But the second one is IT Month, and last year it attracted over 750,000 visitors as it toured the island. That’s not bad going.

Christine, a friend and I went to 101 to a nice restaurant for lunch on Sunday. And I fell in love… with a 24″ Apple display in the Apple Store in “New York New York Department Store“. I’m not particularly fond of fruit, really. Mostly, they tend to be rather expensive here, and you can get a LOT more PC for the SAME price. But there are times when a large-size monitor will really do things: on that monitor, I could open my blog page on one side, and another page on the other side.

And truthfully, there are times when working away on such a size would really help: like updating my blog theme. It’s pretty difficult to keep flicking back and forth between screens to make sure that you have copied all the elements and javascripts from the old theme to the new one. Trust me, it’s painful. In fact, if you look closely, apart from the sidebar, there are still some elements missing.

Could a large monitor help? Well, yes it could! But there’s a snag: I’m looking at 22″ monitors and I’m finding most of them support 1680*1050 which is a resolution my graphics card does NOT support… Whoa! In fact, my card seems to go all the way upto 2048, but 1680 is not one of them… Woops! Little did I know.

So I can choose: a 20″ monitor (which is still pretty big), two 19″ monitors (one for each of my systems at home), or a 24″ monitor… Which would you choose? Do you have any suggestions on other solutions? I’d like to hear what you have to say.

What is your current monitor choice? I’m using a 15″ LCD 1024*768 monitor from about 5 or 6 years ago at home, a Philips 17″ LCD monitor that is two years old (and plenty big!) at work…