failing like never before

11Jan/080

Way Back When

Way back in the days, almost a year ago, this site was running my custom CMS. It didn't look too bad, but it wasn't very configurable and lacked all the bells and whistles that make a mature blogging platform like WordPress so much cooler.

Here's a quick list of the functions that my custom application offered:

  • Image gallery: Upload a picture that was less then 1mb in size and my application would save it and create a thumbnail, there was also a simple gallery interface
  • Live search: A fairly simple feature to implement under Rails. For those of you that still haven't heard of web 2.0, "live search" is where the user types into a search box, and results are returned instantly, without having to actually hit enter and go to another page (try the live search in my left sidebar!)
  • Anyone can join!: My application allowed anyone to keep a blog on my site. Your blog would be hosted at www.42gems.com/blog/<blog name>/, because I didn't know how to create subdomains automatically.
  • Comments: A vistor to the site could add comments without having to register, and they could add cool little emoticons by using TinyMCE. The only problem was that I didn't use CAPTCHA, Akismet or any kind of comment moderation, so I had massive spam issues.
  • Easy to use: One of the upsides of having very little features, my application was extremely easy to use. In that respect, it was vaguely like the ipod, except the ipod isn't free.

And thats about it in terms of feature sets, for my old blog application. I believe pictures are in order...

custom application, main page custom application, image gallery custom application, post and comment

But before I moved to WordPress, I was using Typo. See here for reasons why I decided to move to WordPress. And just because I feel like it, here's a really low quality screenshot of my old Typo blog, using the iWTAP theme.

8Jan/080

Migrated to WordPress

A little more then a week ago, Typo 5.0 was released. Shortly after that, version 5.0.1 was released to fix a bug, and the next day after the 5.0.1 release Typo version 5 was pulled from the mirrors because of a critical bug that would result in the application purging the blog's database. I upgraded to 5.0 almost as soon as it first came out but downgraded back to 4.1.1 as soon as I heard about the new bug.

But even with version 4.1.1 I experienced numerous problems with Typo. In December of 2007, 21.1% of all the HTTP error codes returned by my server, were 500 (Internal Server) errors. In one month alone, the Typo application on my domain experienced 208 internal server errors. I've experienced many of these before. Occasionally, after writing a new post up in the admin section, I would click the “submit” button only to get a 500 error. Or I might be on the home page and click on a category link, again, only to get a 500 error. Most of the times, these errors would disappear once I hit the back button in my browser and tried clicking on the link a second time. But these were aggravating errors and shouldn't have been popping up in a stable application release.

27Dec/070

Lightbox in Typo

A quick little explanation and demo on how to get lightbox running in Typo 4.1.1.Typo 4.1.1 uses an older version of lightbox. If you prefer to use the newer version of lightbox, then go here and download lightbox 2.0. Then, in your Typo application's public directory and overwrite the old lightbox javascript, styles, and images.

You'll also have to make sure that the theme you're using for your blog, has the necessary javascript and stylesheets included. To do this, open

/railsapp/themes/<whatever_your_current_theme_is>/layouts/default.rhtml

and ensure that the following lines of code are in your header.

<%= javascript_include_tag "typo" %>
<%= javascript_include_tag "lightbox" %>
<%= stylesheet_link_tag "/stylesheets/lightbox.css" %>

I would also like to add, that one of the javascript files needed by lightbox is massive 23kb. So if you want to keep your web page as light as possible, you may want to consider not using lightbox effects.

To use lightbox in your blog, just add the following code into the article you are posting:

<typo:lightbox src="image_link" thumbsrc="thumbnail_link" />

Here's a few examples of what lightbox can do.

"The Solid Gold Sound of the UCLA Marching Band!"

27Dec/071

The 500 Epidemic

Some of you may have noticed, that about three weeks ago, all but one of the blogs that I was hosting on my server, crashed, and stayed down for about two days. When I tried to access any page, I got a 500 error, and it was traced back to a Typo application error. This was really weird, since prior to the strange epidemic of 500 errors, I hadn't touched my server in quite a few days. However, one of the blogs on my server was working absolutely fine.

The application that was still functioning had been on my server the longest time. I thought that perhaps the newer version of Typo was unstable and that the blog that was still running was using a more stable code base, but no; all my blogs were running the exact same version of typo.

I went through some basic checks to see what was going on. The log files weren't particularly helpful in telling me what had happened, and mostly just showed that the applications had all failed around the same time, for no discernible reason. I use fast CGI, so I tried switching to just regular CGI, but to no avail. I checked the permissions of files, and even set the permissions for the whole applications to 755. I double checked source files and their timestamps, and found that it had been quite some time since any of them had been altered. I also checked to make sure that rails hadn't gone and updated itself to a less stable version, but it seemed as though nothing on my server had changed. My applications had just died, for absolutely no discernible reason.

It seemed that the easiest thing to do, was to just wipe the application out, and put rails back in. So I took one of the blogs that had hardly been used, and wiped it clean out, but left the database intact. I downloaded a fresh copy of the latest stable copy of Typo, tared it, made the necessary configurations, and found to my total surprise that it gave me the exact same 500 error! After much fiddling and triple-checking to make sure I hadn't messed up the simple installation process, I was still getting the same 500 error. I wiped the application out and tried yet again, getting the same results. The only thing that could seem to be wrong, was the database, so I wiped the database clean, and did a completely fresh install. Still the same results. I had never been this confused in my life, and that includes my Chem 20a final.

But remember, I still had one functioning blog left on my server. So I decided to copy the source code from that 500-error-imune application, and put it on a sub-domain and connect to a new database. And it worked. I have no idea why that particular instance of Typo was immune to the "500 epidemic" but it was, and I was too happy to ask questions.

Three weeks later, I still have no idea what the hell happened. If someone could enlighten me, I would be very happy.

27Nov/070

Porting Pains

A few quick note about a few problems that occurred when I ported my blog to Typo.

Firstly, I didn't move all my images over, so any posts that included images from my site, I didn't port. Fortuently, there weren't very many of these. As soon as I get a good elegent solution to uploading images (probably after finals are over), I'll re-post those articles.

Also, I didn't port comments, since it would have taken more time to write a script that could do that properly and I was too lazy to do it. But of course, I never reccieved very many comments in the first place. Hopefully, my site hits will increase now that I am using a blog engine that has trackbacks, RSS and all that fun stuff.

Tagged as: , No Comments
5Nov/070

Moving to Typo!!

That's right, my non-existant readers! In a few days my little pet blog software is coming down, and I will be migrating everything to Typo.

Be ready!

Tagged as: , No Comments