[Mongrel] Mongrel is crashing under heavy loads

Zed A. Shaw zedshaw at zedshaw.com
Fri Oct 6 11:15:02 EDT 2006


On Fri, 6 Oct 2006 09:58:36 -0600
Donald Marino <donaldmarino at mac.com> wrote:

> Hi
<snip>
> 
> The line in particular that appears to  be breaking is:
>
>   $mongrel_sleeper_thread = Thread.new { loop { sleep 1 } }
> 
> Found at line 274 of configurator.rb
<snip>

Well, there's not a whole lot Mongrel can do to keep Ruby from segfaults.  I'd suggest just removing this line or commenting it out for now.  What that does is keep a thread going so that Ruby will actually exit when told to (since, for some dumbass reason select() in Ruby needs one thread to actually exit without IO).

If you still segfault after this, then you'll have to do the following:

1) grab the ruby source and recompile with debugging turned on (probably requires:  CFLAGS="-g" make)
2) run your app until it explodes again and keep the core file.
3) open the core file in gdb and type:  backtrace
4) take whatever gdb says is the ruby backtrace and post it to ruby-lang asking for help.  Someone there might know (if they don't argue with your for days on end about the merits of OS level VM malloc strategies and how it's not really a bug).

If you get ultra stuck, contact me off-list and i'll try to help, but there's probably not much I can do since I'm not a ruby internals expert (more of a death ninja hater really).

-- 
Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu
http://www.zedshaw.com/
http://mongrel.rubyforge.org/
http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help.


More information about the Mongrel-users mailing list