After stearing clear of Apache2 for the last year for all production servers I’m now ready to give it another try, thanks to Phusion’s Passenger. I’ve grown really tired of setting up god scripts for all environments and fighting mongrel’s pidfile suckage.
Far too many times have things failed because of a dead worker in the cluster or some stale or (even worse!) non-existent pidfiles on the system. Mongrel has served well, but it’s time to look for something better.
A typical setup I use is nginx as the front-end server doing all static content while a pack of mongrels is handling the Rails requests through reverse proxy. nginx is also very important for reproxying requests, where content is streamed from another internal server over the front facing servers. In most of the Rails app I’m writing I have to deal with very large files (audio, video) so reproxy is essential if you want to have any sort of performance on a reasonable budget. Since Apache2 lacks reproxy support (AFAIK, please prove me wrong!) I really want to keep nginx as the front-end server and then do the Rails handling with Apache2 + Passenger through reverse proxy.
I’ve come a cross a couple of posts on this very topic.
I’ll be doing some heavy development and testing over the next couple of days with this setup, will post my findings…
After reading about all the trouble folks went through in getting an iPhone I felt super lucky!! Yesterday I phoned the local BelCompany store to see if they were getting any delivered. There seems to be a reservation list so I asked the guy if it still made sense to sign up. He said sure.. I was number 20 on the list (what, only 20 ppl??). Early this morning I got a call saying I was the last one to secure a phone in the from first batch!! Woaw! The T-Mobile activation system was severely overloaded so the only thing I could do is sign a pre-agreement and wait untill tomorrow (12th) to pick it up. If only I was so lucky playing the lotto!. More as soon as I actually have it in physical possession!
Update: Well got the iPhone 2 months ago. Apart from the terrible battery life, dropped calls, horrible 3G reception and Apple’s draconian developer restrictions, a wonderful phone! Time to jailbreak it…
In Rails 2.0.x the end_of_month now properly gives you the end of month e.g. Mon Jun 30 23:59:59 +0200 2008, instead of Mon Jun 30 00:00:00 +0200 2008, which was the case in Rails 1.2.x (see this previous post). Good thing I caught this, since it used to inside the Nota module of Beldienst. We would be paying out the first of each month twice otherwise
Article was updated. See below, the Option software should work out-of-the-box for Leopard 10.5.5 or higher!
Last week I received my HSDPA/UMTS/GPRS card from XS4ALL. After the major ADSL outtage fiasco It really dawned on me that not having net access for a day actually costs more than the whole wireless plan per month! Think about it, as I telecommute 4 days in the week I would actually have to drive to the office to get work done (luckily our offices were spared from the outtage!), the parking money alone is almost more than the whole plan (go Amsterdam!). Enough justification for the new toy. It arrrived, weeh!
Continue reading Getting XS4ALL HSDPA/UMTS working on OS X Leopard
Just found out there’s a massive memory leak in ruby gettext 1.90.0, one of our applications started eating GBs of RAM after a couple of days in use. So If you’re using gettext for translating your Rails app take note! You can grab the current trunk which has a fix for this.
Found here (thanks Jan). Soo true! Happy telecommuter for 2 years now, with the occasional Meeting midweek. I do not expect to be productive (code-wise) on those days.
My first Rails 2.0.x project has been running in production for a couple of months now. It’s the website for KRO’s “De TV Flat”, a children/teens program airing every Saturday on dutch national television around 9am (channel Nederland 3) untill the beginning of summer. I’m very proud to actually get one of my projects on TV! The premise is basically “Youtube for kids” with the chance of getting your self-made video’s broadcasted on TV!
I really like the instructional video’s made by the TVFlat crew, very helpfull tips for creating your own video content.
Technology used:
- Linux
- Nginx HTTP server
- Mongrel
- MogileFS clustered storage
- Rails 2.0.2
- Merb 0.54 for critical code paths, beats Rails to a pulp when it comes to roundtrip times
- Memcached
- MySQL
- Lucene
- mplayer / ffmpeg / faac for transcoding, direct broadcast quality feeds are generated!
- Flash video
Hope I can find some time later on to write a bit about the different parts.. anyway, go check it out!
It has been very quiet on this blog, but not so much here at home. On March 2th 2008 our daughter Mia Morena Elisabeth Lo-A-Foe was born. Mia is a healthy baby girl who regularly eats every 3 hours, around the clock. After 6 weeks we’re completely comfortable with the new schedule. Andrew loves his baby sister very much but still pokes here once in a while just to see what’s she’s made of
It has been very quiet on this blog, but not so much here at home. On March 2nd 2008 our daughter Mia Morena Elisabeth Lo-A-Foe was born.
Mia is a healthy baby girl who regularly eats every 3 hours, around the clock. After 6 weeks we’re completely comfortable with the new schedule. Andrew loves his baby sister very much but still pokes here once in a while just to see what’s she’s made of

I’m working on a Rails 2.0.x project which is a port of a 1.2.x based one. Since acts_as_taggable was obsoleted in 2.0.x I’m using the ultra wicked has_many_polymorphs plugin which comes with a neat Tagging generator. I ran in a bit of problem when I tried tagging an object with the tags “cool mac 2008″. It turned out the “2008″ is the culprit since the tag_with method that’s introduced tries to be really smart about things. I.e. it assumes that if you pass a number in the tag_with string you actually want to use the Tag object with ID=2008. Of course we don’t have 2008 tags yet so it breaks down with an exception. The solution was really simple. Just remove the Fixnum check in the lib/lagging_extensions.rb ..
P.S. Better late than never: Happy 2008!!!