Daemonizing Mongrel
is the current darling of the Ruby on Rails world, and for a very good reason – it is an excellent server for your Rails applications. Recently I switched to using Mongrel behind Apache running mod_proxy and I’ve had no complaints with it.
Before anyone points it out, yes there were some issues with this server recently but they were caused by mod_mono hogging all the memory, and not Mongrel/Rails. Once I disabled Mono normality was restored.
I did have one minor niggle though. After restarting my server a couple of times during the aforementioned Mono problems I had to restart Mongrel manually. I knew there was a better way to do it, but I didn’t know how. Now I do…
Hosting Rails applications with mongrel , Apache 2 & mod_proxy on Debian Stable
About ten months ago I switched from Apache 2 to `lighttpd` for hosting this site. This was back in the day when the only real way to run your rails app was through FastCGI.
Times change and now all the cool kids are using Mongrel or clusters thereof. I tried to get Mongrel running with Lighty, but I gave up for two reasons:
1. The maintainer of Mongrel recommends not to use lighttpd because of issues
2. Whilst ignoring him and pressing on regardless my Lighty install fubar’d and I couldn’t recover it. It just wouldn’t serve any content anymore – dynamic or static
So I decided to swtich back to Apache 2. There are various guides around for hosting mongrel behind a load balancer behind Apache 2.2, but the load balancer isn’t available for Apache 2.0 and there’s little documentation for alternatives. Balancing would be nice, but it’s not my main objective here so I did some more digging and concluded that `mod_proxy` would meet my needs.
look good