see a puffin eat a fish

mod_rails is my girlfriend

without comments

Passenger

Sometimes you stumble across a piece of software that just changes the whole nature of the game. This is one of them. I’ve been dealing with Rails memory leaks for weeks now. Granted part of my problem is that I don’t have the time to devote to being a full time administrator, i’m too busy writing the code, but either way these leaks have been driving me crazy. I went so far as to install this blasphemous piece of software but outside of the unfortunate name and the innumerable puns it creates (let g-d control you deamons), cycling mongrel instances when memory usage peaks is no way to run a website.

I got so irritated that I rewrote the site in PHP. Yes, I did that. Looking at PHP code makes me tense up but PHP has very tight coupling with Apache and I can’t remember the last time anything I wrote in PHP ran out of memory. The process was made slightly more palatable by using CakePHP, which is a sad, sad MVC Rails-like framework in PHP. For every line of Rails I am used to writing, I write 12 lines of CakePHP. Shoot me now. But CakePHP never crashed with the same load and back end data store so I resigned myself to putting stability over my own happiness. PHP it would be.

Marathon runners molting

Then, ok get this, THEN I find mod_rails! And it works, and it does exactly what it says it will do and it is such a cinch to install. It’s a tighter coupling with Apache and my site hasn’t crashed in a long, long time. And my site is fast. And I don’t have 16 little mongrel instances running for which I have to figure out memory allocation and it knows about Rails caching implicitly, I could go on and on. This module is the best.

Written by mb

December 8th, 2008 at 12:45 pm

Posted in Code

Leave a Reply

IMPORTANT! To be able to proceed, you need to solve the following simple math (so we know that you are a human) :-)

What is 12 + 3 ?
Please leave these two fields as-is: