Words > 2006
More "under-the-hood" maintenance, this time simplifying my anti-bandwidth
leeching code.
Lots of "under-the-hood" maintenance, mostly relating to database access.
A visitor to the site got in touch with me recently to ask how things are going with
the hosting, since I moved from SupaNames to LiquidSix back
in February.
Well I'm pleased to report that everything's going very well with the new hosting.
I have two sites hosted with
LiquidSix, and I experience
next to no problems each month, despite receiving a fair amount of traffic. I get the
occasional database connection error, perhaps one a month, but that's acceptable.
As you can read in my rant elsewhere, while at SupaNames I was experiencing a huge
number of database connection errors each month, and a shocking amount of site
downtime too.
I have had to contact LiquidSix support on a couple of occasions, and I can
honestly say I've experienced nothing but excellent service. Responses have always been
prompt, polite, and more importantly, well informed. I put some of this down to the fact
that LiquidSix are a comparatively small host, and are therefore able to give a little
more resource to individual customer queries. That doesn't excuse the big boys however
- just because a company is large, it's no reason for poor customer service. I guess
as a company gets bigger and more successful it sometimes gets greedy, and customer
support is an easy place to cut corners (and costs).
Anyway, I digress. Short answer - LiquidSix have been a great host these past 9 months,
and they've certainly got my business secured for the foreseeable future.
If I'm trying to view a large PDF document, or a video file, I'd much rather
download the file to my hard drive first, rather than have Adobe Acrobat Reader or
Windows Media Player try and open/download the file for me, with clumsy caching, and
in some cases the inability to save a local copy to my hard drive should I want to.
So it's annoying when you have the URL of a file, but no actual link,
so you can't right-click "Save as..." in the browser. This can happen when you've been
emailed a link in plain text, or if you're trying to browse to a link from another
application (in my case I was trying to browse to a PDF from within Microsoft Visual
Studio). In such cases you copy and paste the URL into your browser's address bar, only
to have the associated application try and open the file, as described above. It's
not the end of the world, but it annoys me approximately once a month, and that's once
too often for my tastes!
Today I wrote a simple tool, the
Download Link Generator.
This tool will allow you to copy and paste the URL of the file you'd like to download,
and generate a regular HTML hyperlink, which you can then right-click and
"Save as..." as usual.
It's not exactly rocket science, but it saves me getting annoyed now and then - I
hope some of you find it useful too.
Last month I finally made some real money as a direct result of this website -
I was contacted by a company to write a customised version of the
Salary Timer,
that they wanted to make available for download to their customers. They wanted
a couple of fairly trivial changes, such as adding their logo to the main
screen, and a link to their website from the "About" box. They also wanted to
rename the "Poo Timer" to something a little less controversial - chickens ;o)
I won't say exactly how much they paid, but it certainly covered all the
hosting costs for this site since it went live in 2002, with plenty of change
left over to keep things rolling for many years to come. Of course it doesn't
come close to reimbursing me for the countless hours I've spent writing software
such as the Salary Timer in the first place, or the hours I put in updating
and maintaining this website, but then I never intended making any money from
this "MrCeri" lark, it was only ever supposed to be a bit of fun. Still, it's
nice to finally get a little payback for my efforts, even if it's only to cover
my costs.
I should point out that I'm happy to repeat the exercise, so if anyone out
there is interested in their own customised version of any of my work,
please let me know!
Minor update to my Links page.
Mike Shegog pointed out to me that my Simple Encrypt program was broken
in a major way. The original code was about 4 years old, and after a quick review I decided
it wasn't worth salvaging. I have therefore removed the program from my site, but if you
desperately need a copy, please contact me.
As an aside, I've been using
TrueCrypt now for about a year,
and I'm finding it an excellent encryption solution. Highly recommended.
Earlier this month I mentioned the problem of bandwidth leeching.
I thought it might be useful to write an article describing the issue in more detail, and
offer a summary of the various anti-leeching techniques available.
Click here to read the article...
I don't really feel that strongly about the issue of
bandwidth leeching
(or "leaching" - take your pick), mainly because this site doesn't really get an awful
lot of traffic, and I'm always well within my bandwidth allowance each month (oohh, poor me!).
A certain percentage of my bandwidth is leeched each month however, by people linking
directly to images on my site. When people are giving MrCeri the major kudos I so deserve,
I simply wave, "carry on good Sir, leech away!". But when they are re-using my images for
their own evil gains, without an appreciative nod in my direction, I shake my head in
despair at how low society has fallen.
It's fun once in a while to try and come up with strategies to prevent people nicking
images off your site, and by extension pilfering your bandwidth. There's no real way of
course to protect either at the end of the day - there's always "Alt-Print Screen" for
the images, and as for bandwidth, there's always
Slashdot :o) Still, it's not hard to
come up with strategies to thwart 95% of your visitors.
So this month I've started tinkering with some of my worst affected images, not really
to save bandwidth, but just to restore a little credit where credit's due ;o)
Yes, it's very childish I know, but that's the internet for you!
Updated Salary Timer for 2006-07
UK financial year.
Updated Raise Calculator
and Tax Calculator for 2006-07
UK financial year.
Fixed a stupid bug that got introduced as part of the hosting transfer, where "£"
signs started being displayed as "$".
Any time I've had to tinker with mrceri.co.uk this month has been spent sorting
out the hosting transfer from Supanames to
LiquidSix. The site's been live
on LiquidSix for over a month now, and so far, so good; I've had none of the problems
I was getting with Supanames. Fingers crossed it stays that way...
SupaNames Rant - The quick version
My site has been hosted with SupaNames since its humble beginnings back in 2002. When
it was a LAMP [1] site, everything was fine, but since
upgrading to their Windows .NET service, I have had problem, after problem, after problem.
Added to the fact that their support staff seem ill-qualified to support .NET hosting,
and at times can be accusatory and downright rude, I have become less than happy with
SupaNames' "service". On one occasion my website was out of action for over 7.5 hours
due to their server mismanagement.
In a nutshell, I think SupaNames are an ok, cheap solution for LAMP hosting, but an
awful provider of Windows .NET hosting. I will personally be avoiding them like the plague
in future, and I would advise others to do the same.
I will be moving my hosting to another UK provider, called
LiquidSix. I don't know too much
about them, but from what I've read they seem to understand .NET, they offer .NET 2.0
hosting (SupaNames do not at present), and they cost less than half the price I was paying
SupaNames.
Fingers crossed I'll have a better experience with these guys...
The long and detailed version
SupaNames are the only company to have hosted mrceri.co.uk so far. Back in the early
days, mrceri.co.uk was written in PHP, and ably/cheaply hosted on one of their low cost
Linux packages.
In late 2003, when I started writing a lot of ASP.NET in my day job, I thought it
would be a good idea to switch mrceri.co.uk over to .NET too. SupaNames had recently
released a fairly good value Windows package, "Windows Start", so I upgraded to it early
2004.
That's when the problems started...
SupaNames seem to be pretty good at hosting small-scale LAMP sites, but they simply
do not have a clue when it comes to Windows hosting. A common pattern with ASP.NET
websites is to have a top-level exception handler which traps exceptions generated
elsewhere on the site. The user gets redirected to a friendly "something went wrong"
error page, and the developer, i.e. me, gets emailed a detailed description of the
exception to help diagnose and fix the problem.
Terrible MySQL connectivity
For a couple of reasons [2] I wrote my own web stats
control for mrceri.co.uk. This means that every time a page is served, some code gets
executed, and an insert is made into a MySQL database. That provides a lot of opportunity
for errors to occur, and exceptions to be thrown, and thrown they were!
The main problem involves MySQL connectivity. Ever since I started hosting the ASP.NET
version of my site with SupaNames I get the following exception generated several times
a day:
ERROR [HY000] [MySQL][ODBC 3.51 Driver]
Can't connect to MySQL server on 'hostname' (10061)
Some days I have literally hundreds of these errors. I should stress that this isn't
an error in the code, thousands more of these calls are completed successfully; SupaNames
obviously have a problem with a flaky connection or traffic bottleneck between their web
and database servers.
Poor server management
The other exception which occurs with depressing frequency is:
System.Web.HttpException: An unhandled exception occurred during compilation
using the CodeDomProvider 'Microsoft.CSharp.CSharpCodeProvider'. Please
review the stack trace for more information about the error and where it
originated in the code.
---> System.IO.IOException: There is not enough space on the disk.
Now you don't need to be a .NET programmer to take a stab at diagnosing that little
beauty. Again, not related to my code, sometimes my site will sit unchanged for weeks
without errors, then suddenly hundreds of these bad boys start pouring into my inbox.
This error indicates that the ASP.NET website is broken, but the
server is still alive and kicking, as is the asp.net worker process
(indeed it would have to be to send the exception email). So server monitoring will
show the server as being up and healthy, static HTML sites will work fine, as will
PHP sites, or any other server-side technology not affected by this error. ASP.NET
websites on the other hand, will NOT work.
SupaNames only monitor the health of the server, and the asp.net worker process, not
customer websites themselves. This is totally appropriate for budget hosting, but the
problem is that SupaNames do not even appear to have their own test website, so the only
time they learn of such an error is when they are informed by a customer! I have had to
do this on several occasions - minutes after sending my email, my website miraculously
"comes back to life" - I'm guessing the tried and tested "reboot the server" technique
being SupaNames' troubleshooting tool of choice.
On occasion my site has been down for 7.5 hours due to this error. I don't believe
I have an uptime SLA with SupaNames, but 7.5 hours of broken website due to an
ill-configured server is pretty disgraceful by anyone's standards.
Worse still, this problem hasn’t occurred only once, or twice – it occurs
all the time.
Terrible support
Before launching into a clichéd tirade against their frontline support, I must
concede that they have always been very quick, usually responding to email queries
within the hour. And back when I was hosting a PHP site, they were generally helpful
and courteous.
Since moving to .NET hosting they have been similarly rapid in response, but
otherwise totally useless. I generally have to diagnose and explain their server problems
to them myself, which they eventually fix with a reboot, and no explanation of what
caused the error (I suspect they rarely know).
My most recent encounter with them was most unpleasant - it took me half a dozen
emails to convince them that my site was broken for 7.5 hours, for which they didn't
even apologise, or offer any kind of explanation. Along the way they tried to fob me
off with feeble excuses, implying that I was simply "wrong", and that the site wasn’t
broken. Despite the fact that I provided them with third-party server monitoring proof
(incidentally the same monitoring service they themselves use [3],
so you'd think they'd trust it!), and other evidence based upon the raw IIS logs
for the site, and other 3rd party domain checking tools [4].
The only response they could muster to my evidence was, "it is doubtful that your
server was down for the timescale you mention". Arghh!!! The frustration!!!
It wasn't like I was asking for a refund, or trying to get something out of them.
I work in the industry, I know mistakes are made. I just wanted some acknowledgment
that my site had been affected for the specified time, that the fault was theirs,
an apology, and some reassurance that measures would be put in place to stop it
happening in future.
Incidentally this error has occurred several times since, but I don't even bother
emailing them now, it's simply not worth the stress.
Update:
After several days recently of suffering the "Not enough space on disk" error
described above I emailed SupaNames support, informing them of the error. Their advice
to me was:
"You shouldn't be using 'Default.aspx' - use 'index.aspx' instead", and "overview
your coding" !?!
As anyone with a grain of knowledge regarding ASP.NET knows, 'Default.aspx' is the
'correct' way of doing things, certainly the default naming convention when building
a site using Microsoft tools such as Visual Studio. Regardless, whether to use
"Default", "Index", or any other default document name of your choice is a simple IIS
configuration. Furthermore there was/is nothing wrong with the coding on my site,
what little there is, the error being due to the ASP.NET worker process not being able
to compile the site DLLs on the server, due to no disk access (either bacause of a
full hard drive, as the exception suggested, or bad write permissions for the ASP user;
could be any number of reasons).
Anyway, 10 minutes after I sent my email, and without me touching a line of code,
suddenly the site was miraculously working again. The old SupaNames "reboot server"
strategy me thinks...
Conclusion
Hosting is a competitive marketplace, and after this level of annoyance my only
choice is to vote with my feet, and take my business elsewhere. Some might say that
you get what you pay for, but remember SupaNames seem to win hosting awards left
right and centre, so it would be easy to get fooled into thinking they provide a
good service. I can only hope that this rant helps others avoid making the same mistake.
Links
Two minutes with google suggests I'm not the only one to have had problems with
SupaNames:
www.webhostingtalk.com/showthread.php?threadid=158989
www.webhostingtalk.com/showthread.php?t=472705
www.webhostingtalk.com/showthread.php?t=169731
www.webhostingtalk.com/showthread.php?t=274359
www.webhostingtalk.com/showthread.php?t=226600
Great. Even as I'm writing this my live site is broken:
Update: November 2006:
Shortly after writing this article I moved my hosting from SupaNames to
LiquidSix. I've been with them for around 9 months now,
and so far I've enjoyed an excellent service, both in terms of technical stability, and customer support. I'm
happy to recommend them.
[1] LAMP: Linux, Apache, MySQL, PHP/Perl
[2] When mrceri.co.uk was a LAMP site, I had no access to the raw Apache logs.
When I moved the site to Windows, the IIS logs were only kept for 7 days.
[3] www.server-monitoring.co.uk
- a great service, highly recommended.
[4] www.checkdns.net
- very useful for confirming errors are not restricted to your local network.
I'm a great fan of long sentences, that ramble along full of commas, semi-colons,
and other assorted punctuational goodness. I was therefore most pleased to stumble upon
this little beauty when I started reading Iain M. Banks' latest sci-fi offering, "The
Algebraist":
"The Archimandrite Luseferous, warrior priest of the Starveling Cult of Leseum9 IV
and effective ruler of one hundred and seventeen stellar systems, forty-plus inhabited
planets, numerous significant artificial immobile habitats and many hundreds of
thousands of civilian capital ships, who was Executive High Admiral of the Shroud
Wing Squadron of the Four-Hundred-and-Sixty-Eighth Ambient Fleet (Det.) and who
had once been Triumvirate Rotational human/non-human Representative for Cluster
Epiphany Five at the Supreme Galactic Assembly, in the days before the latest ongoing
Chaos and the last, fading rumbles of the Disconnect Cascade, had some years ago
caused the head of his once-greatest enemy, the rebel chief Stinausin, to be struck
from his shoulders, attached without delay to a long-term life-support mechanism
and then hung upside down from the ceiling of his hugely impressive study in the
outer wall of Sheer Citadel - with its view over Junch City and Faraby Bay towards
the hazy vertical slot that was Force Gap - so that the Archimandrite could, when
the mood took him, which was fairly frequently, use his old adversary's head as
a punchball."
Now that's a sentence to be proud of!