It's not all about "unstable" Mongrel :)
Well, after 2 days of weird server behavious, after which I have installed the Monit services monitor, it turned out that Mongrel was not actually the biggest source of the problem.
Yesterday, server started behaving very weirdly - restarting itself every 10-20 minutes. No trace of errors in logs, no notifications about restart to be performed even. I though that may be, just may be it is a software problem, although everything looked like a hardware problem from at the first glance. So I have checked cron (oh well, who know may be there's some process restarting the server?), even tried to turn off Monit as it was the only software I have installed recently. All this just to find the server restarting in next 10 minutes :)
At this point, I finally decided to attach a monitor to the server - yeah it was headless before that heh :) And once it was done, I could witness the exact way the server restarts itself - by just.. turning itself off and on, like somebody just pressed the Reset button. So.. since then it definitely started to look like hardware problems so I took the server offline completely and booted up from memtest CD. Just to find out that server restarts itself before the test progress even reaches 2%.
Long story short - got a new memory module, installed, started server - and all is fine since then. But anyway, all these manipulations with setting up Monit were not without use. Mongrel instances still crash several times a day. But are quickly relaunched by Monit.
So, hopefully now more midnight server fixes :)
March 24th, 2007 at 5:34 pm
I read your posts about your servers troubles. I would like to say that Mongrel has never crashed on me during the last 6 months, I have more than 12 instances running over 3 servers, all of them are happily installed and running. But I noticed during development that some gem / plugins tend to crash mongrel. So be careful what you use. So you can say that mongrel is intolerant but it is pretty much stable. I wish if it just complains about its problems instead of just fade away silently.
And nice blog by the way.. :)
March 24th, 2007 at 7:17 pm
Ibrahim,
thanks for the comment :) After we have bought a new server, there was not a single crash on Mongrel since then! Very stable (as a server should be, of course). I'm running only 6 instances right now, serving 3 not very busy Rails-based sites. Indeed it would definitely be good for Mongrel to complain in some way.. but oh well that's how things are currently :) Monit does its job regarding this matter, though I was getting lots of false alarms, stating that connection is not passed to a mongrel instance (guess the instance was just a bit busy serving other client and Monit was not patient enough to wait). BTW, that's the reason I have turned off Monit on the server. Well.. anyway, everything works smoothely, so there's no need for Monit anymore.