OutputCompression filter now available as a Rails plugin

January 19, 2006 Link to post  Permalink

I’ve taken the OutputCompression filter and made it into a Rails plugin. I’ve added it to the Rails plugin page (towards the botom) and have a publically available subversion repository containing the code.

This code includes the fixes by Sebastian for handling Component rendering correctly.

Bug in my memcache usage post

January 17, 2006 Link to post  Permalink

I found a bug in my setup of memcache code in a previous post. Here’s the update:

The Seahawks Rock!

January 15, 2006 Link to post  Permalink

On Saturday the Seahawks won their first playoff game in forever – woot!

Before the game, we attended a large breakfast with the CEO Tod Leiweke and President of Football Operations Tim Ruskell. Steve Raible was there too.

In addition, they had three of the Seahawks Ring of Honor inductees there – Curt Warner, Jacob Green and Steve Largent. Lisa ran to get our Steve Largent Wheaties box and had Steve sign it for us!

80 of us managed to get into a group to do the flag ceremony before the game. We went down to the field just after 10:30, and then spent 20 minutes doing a run through of the whole flag thing. Then we had to wait around on the field for the next two hours before the game.

Rails using memcache for everything

January 13, 2006 Link to post  Permalink

The Rails documentation for using memcache is a little skimpy. I eventually worked out how to use it for a Session store by googling. The Fragment cache store was a little easier.

Here’s the relevant parts of my environment.rb file:

The order of these things is important – the DEFAULT_SESSION_OPTIONS can’t be changed until after the Initializer has finished, for instance.

This configuration gives me:

WEBrick failure with large database requests

January 10, 2006 Link to post  Permalink

I tracked down a bug with WEBrick today that I reported with a patch

I think the key is that I have a few large images (60K+) being served from the database, causing the dynamic thread to run long enough for a second dynamic thread to get into trouble once a static request has cleared the REQUEST_MUTEX that is meant to keep the second dynamic request out.

The size of the image is key. This doesn’t happenn with smaller images. The database IO is probably causing the first thread to wait, causing the second to run, and its all downhill from there.

I’m using one of Rick’s snippets to apply patches to my Edge Rails.

Two topics come together - Cheese and Rails

January 6, 2006 Link to post  Permalink

Today’s Yakima Herald-Republic has an article about cheese made in the Yakima area.

Although it’s not obvious, the Yakima Herald-Republic web site is one of the early Ruby on Rails sites, written by Ezra

Cheese and Rails – can’t go wrong with either.

Running memcache for Rails sessions and caching

January 4, 2006 Link to post  Permalink

After setting up a Linux machine using these excellent instructions I wanted to expand my configuration to run some memcached processes to test session storage and caching

Having followed the original instructions, I knew that this ‘runsv…’ thing would be useful. It turns out to be something called runit that allows apps to be started, stopped, logged etc. Sounds similar in scope to Windows Services, but much easier to setup for an application.

How runit works is by monitoring a specific directory for sub-directories. For each subdirectory, it will run the run command until it exits for some reason, then it will run the finish command, and then go back and execute the run command again. If there is a log sub-directory, it will do the same in there too.

Rails Page caching is just broken

December 30, 2005 Link to post  Permalink

I’ve been noticing 404 errors on my blog for pages that should be there. After digging around, I noticed that the page cache is getting in the way of delivering pages.

Here’s what I think is going on.

I have a page with a URL http://blog.craz8.com/articles/2005/10/26/typo-has-caching-issues.
I also have a page with a URL of http://blog.craz8.com/articles/2005/10/26 and one with a URL of http://blog.craz8.com/articles/2005/10.

If the page with the shorter URL is requested before the one with the longer URL, then the longer URL will return a 404. If the longer URL is requested first, then nothing bad happens.

All should be working

December 29, 2005 Link to post  Permalink

There was a DNS issue with blog.craz8.com that is now resolved, and Typo page caching has been a little tricky (since I’m not the owner of the generated cache files)

New host

December 28, 2005 Link to post  Permalink

My blog has moved to Planet Argon for hosting. If you can see this entry, then all is well!