QR Code contains TinyURL of this article.Something’s Rotten in Denmark

Some of you may have noticed the recent glitches on this website. For a couple of days now some page requests have resulted in a simple blank page. Viewing the source of those pages revealed nothing, not a single byte of markup.

Then, yesterday, things got even stranger. Page requests were generating 404 errors and a visit to the home page yielded a strange “MetaArray” page. So what on Earth was going on?

This Page Left Unintentionally Blank

sdf.org is the host for the Perpetual βeta website (which you may have already gathered from the domain name). My SDF account has a disk quota, i.e. a portion of disk space that I’m allowed to use, of 600‍MB. This isn’t a lot I know, but should be ample for the website at this time. However, it turns out that this disk quota consists of four equal-sized portions, of which SDF allocate 150‍MB as web hosting space.

The size of the website at the time of writing is around 150‍MB. You can probably tell where this is going…

I’ve written before about how the Perpetual βeta’s CMS “bakes” pages when they are first requested — so that we can serve a static file on subsequent requests — a design decision I made to increase the performance of the site.

So what happened was, on a page request, if it didn’t already exist, the CMS was creating the page, then trying to write the page data to the file-system. The operating system prevented this to a degree, because I’d reached my quota. However, it did create a zero-byte file.

When that page was next requested, it physically existed in the file system, so Apache served it, even though it was an empty file. Hence the blank pages.

I didn’t anticipate this at all when I wrote the page-baking mechanism. I have now reworked the code so that the software can gracefully handle a disk-full situation and that should be the end of the white pages.

The MetaArray

I realised that I would have to upgrade my hosting platform. 150‍MB of disk simply isn’t enough for this growing website. This is where the MetaArray comes in. The MetaArray is SDF’s next level of hosting. SDF describe it as, “a group of multi-core, multi-raid level 5, high-performance nodes which provide computational and data storage/hosting services.” Sweet.

The standout features of the MetaArray for the Perpetual βeta are: a disk quota of 200‍GB (yes, gigabytes); unmetered data transfer; SSL encryption and access to the crontab.

Should keep the site going for little while!