Masthead
One of my photos

Why I was offline

March 10th, 2007 · Posted by Skuds in Technology · 2 Comments · Technology

The upgrade was not the cause of being offline – it was the solution.

The hosting deal I have for this site assumes a fairly low level of activity – thats why it is so cheap. As such it is fine for me because I don’t get a huge number of visitors and, not being an attention-seeking publicity whore, that suits me fine.

If I was running a really popular message board or forum, for example, there would be loads of visitors and loads of processing going on, and I would need to pay more for a higher-spec service. The terms and conditions of the package I have state quite clearly that I can’t “Publish or run any script or item of content that causes server performance to decrease for other users.”

For some reason, this site was doing just that, despite the low volume of traffic. Apparently it was making lots of connections to the MySQL database which never got closed off, resulting in 30-40 open connections. I don’t know what that means, but I am told it is not good and not normal. Unfortunately this was midweek and I didn’t have time to go into it, so the site was turned off until I had time to do something.

Even now I don’t really know what as going wrong, and I am just hoping that that an upgrade will have fixed it all. I had been meaning to do it anyway, so no harm done.

I stil wonder whether all the grief was caused by real human visitors or by the dodgy automatic spam comment bots which I am plagued by. To give some idea of the scale, I would normally get a few hundred proper visitors a day according to Statcounter which only counts a visit when a page containing the Statcounter code is loaded, which will always happen to visiting humans. The server stats which count all activity have recorded days with over 50,000 hits – so there are about 50,000 hits from automated processes by my reckoning. Some of these will be search engine crawlers or checks on the feed from B4L, but I can only assume the rest is junk.

Of course I have not discounted the theory that my trouble could have been caused by some of the measures I have in place to counteract the spam – like Bad Behavior. I will just have to wait and see if everything works OK now – if it doesn’t I may just take the easy way out and upgrade to a higher-spec package.

That would have a silver lining: I would then be able to host music and video files, which are not allowed under the cheap package.

It goes without saying that if any WordPress users have encountered similar problems, or have ideas which might help me, I will welcome any suggestions.

Tags: ···

2 Comments so far ↓

  • Dharma

    Just throwing in my 2 pence, dont know how much you know about this web development. Basically your website is data-driven so all the text and content is held in a database table. When a user goes on the site the database is interrogated and your content is sent. To faciliatate the transfer of that information a connection is made. What could/should happen. If users are requesting data from the Database with the same access credentials, the same connection can be reused. Its called connection pooling. If your getting as many open connections as you say, you need to enable connection pooling.

  • Skuds

    I think that WordPress only makes connections for a short time, and the particular modules do not use the persistant connection hook, so connections should close down as soon as they are no longer needed. I think it would be rare for me to have more than a couple of access at the same time.

    As far as I know, most instances of WordPress manage quite happily so it may be that there was something wrong with the MySQL database on the old server.

    Not sure how I would enable connection pooling though: I don’t have shell access or anything like that.