[Mongrel] Mongrel spewing backtraces and nanosleeping

Zed Shaw zedshaw at zedshaw.com
Wed Sep 13 18:24:25 EDT 2006

On Wed, 2006-09-13 at 16:00 +0200, Jacob Atzen wrote:
> Hi list,
> I'm seeing a couple of issues with Mongrel. I'm running FreeBSD 6.1 and
> have previously been told that there are known conflicts between this
> and Mongrel, yet I hope these issues will be resolved with time.
> I'm overloading Mongrel with httperf on my local workstation. Mongrel is
> started directly with the mongrel_rails command and there is only one
> mongrel running. Soon I will start seeing:

This guy walks into the doctors office and says, "Doc! It hurts when I
do this."  He then sticks his finger in his eye and gouges out his
cornea and eats it.  The doctor yells, "What the hell did you do that
for?!"  Guy says, "So I can test how much damage my eye can take.  See,
it sucks, I need a stronger eye."

In other words, congratulations you've overloaded Mongrel with httperf.
That's not too hard since Ruby only has 1024 files and you're probably
hitting a rails action that opens loads and loads of files or just plain
maxing it out.

The way mongrel defends itself is to try closing things off, but there's
not much it actually can do.  It's at the mercy of Ruby and that's that.
End of story.

So, there's no "issue" other than you need:

1) To tune your rails actions to be faster.
2) More mongrel processes.
3) To not do this to mongrel.
4) Maybe more machines if this is the load you have to handle.

You should also get the pre-release and use the USR1 logging
(mentioned on this list many times) to debug which rails action is
taking the longest and holding up the other threads.  Then tune that
rails action up to service the requests faster.

Hope that helps.

Zed A. Shaw
http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help.

More information about the Mongrel-users mailing list