[Mongrel] How to setup a sweeper to restart stale or hung mongrel servers
zedshaw at zedshaw.com
Thu Sep 7 19:43:16 EDT 2006
On Thu, 2006-09-07 at 16:08 -0600, Kirk Haines wrote:
> On 9/7/06, Jared Brown <jaredbrown at gmail.com> wrote:
> > How do I setup a sweeper to restart stale or hung mongrel servers?
> If Mongel servers are hanging, doesn't that suggest some sort of very
> ungood bug somewhere, most likely in the application code somewhere?
> I know this doesn't answer your question, but a hanging server seems
> like it falls into the category of things that just should not happen,
> and that it'd be worthwhile to get to the bottom of why it is
> happening before working around the fact that it is happening.
Yeah, I think people are used to FCGI where zombies and broken processes
are just the way it goes. I've made sure there's *tons* of debugging
features in Mongrel so people can figure out what is causing the hangups
and using these features we've found it's almost always one or two rails
actions, that it's easy to spot with USR1 logging, and that it involves
a simple rewrite or moving that code to a DRb server.
But, when you're backed against a wall, having a process monitor is the
only thing you can do.
My favorite is monit, other folks like runit/daemon tools.
Zed A. Shaw
http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help.
More information about the Mongrel-users