[Mongrel] Problems with mongrel dying

Zed A. Shaw zedshaw at zedshaw.com
Thu Nov 2 22:13:05 EST 2006

On Fri, 3 Nov 2006 15:25:32 +1300
"Sam Giffney" <samuelgiffney at gmail.com> wrote:

> Hi Robert,
> I have no idea about your problem but the workaround is simple. Use
> Monit to regulate your mongrels (it'll do the checking and restarting
> for you every 3 minutes)
> I risk falling on Zed's sword of wrath but my mongrels escalate in
> memory usage under load and I use Monit to restart them and keep em
> tidy
> (I fully presume it's because of MY lousy code)

That's probably the best you can do until you can find out why it's leaking.  My past experience has been to never trust Ruby's GC or any external C extensions you may be using.  I've combed through Mongrel to insane levels to root out all possible leaks I can.  Yet, the Sync vs. Mutex bug and recent Array patch from Eric M. shows that Ruby's GC has a long way to go.

If you can't find it right away with the -B option and log/mongrel_debug/objects.log then it's probably too deep inside Ruby or a C extension you're using (RMagick is a big one).  Just hit it with monit and at least your site keeps going.

Ugly, but it works.

Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu
http://safari.oreilly.com/0321483502 -- The Mongrel Book
http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help.

More information about the Mongrel-users mailing list