[Mongrel] mongrel becoming unresponsive

Ezra Zygmuntowicz ezmobius at gmail.com
Mon May 7 19:01:20 EDT 2007


Nathan-


	This line is very telling:

   Server overloaded with 5 processors (5 max). Dropping connection

	Mongrel has a numprocs setting that defaults to 900 i think. It  
looks like somehow it is being set to 5 in your mongrels so they  
start timing out threads when there are more then 5 connections in  
mongrel being processed. I'd say up your numb procs to 50 or so and  
if you are using haproxy make it limit connections to mongrel to one  
at atime. That way the requests queue in haproxy and only go to  
mongrels that aren't busy.


Cheers-
-Ezra
	

On May 7, 2007, at 3:55 PM, Nathan Clark wrote:

> I am also having an issue with mongrel becoming unresponsive.
> Here is it's environment:
>     Red Hat Enterprise Linux ES release 4
>         ruby 1.8.5 (2007-03-13 patchlevel 35) [x86_64-linux]
>     Mongrel Web Server 1.0.1
>
> In front of these mongrels, is Apache and the haproxy load balancer
>
> I am running several different ROR sites on the same server.
> after a few hours the rails application will become unresponsive.
>
> My log file sings this tune:
>
>     Server overloaded with 5 processors (5 max). Dropping connection.
>     Mon May 07 11:53:04 -0500 2007: Reaping 4 threads for slow  
> workers because of 'max processors'
>     Thread #<Thread:0x2a98447ab0 sleep> is too old, killing.
>     Mon May 07 11:53:04 -0500 2007: ERROR: Mongrel timed out this  
> thread: max processorsThread #<Thread:0x2a98451740 sleep> is too  
> old, killing.
>     Mon May 07 11:53:04 -0500 2007: ERROR: Mongrel timed out this  
> thread: max processorsThread #<Thread:0x2a98459990 sleep> is too  
> old, killing.
>     Mon May 07 11:53:04 -0500 2007: ERROR: Mongrel timed out this  
> thread: max processorsThread #<Thread:0x2a984d9168 sleep> is too  
> old, killing.
>
>     Server overloaded with 5 processors (5 max). Dropping connection.
>     Mon May 07 11:53:06 -0500 2007: Reaping 5 threads for slow  
> workers because of 'max processors'
>
>     Mon May 07 13:29:29 -0500 2007: Reaping 3 threads for slow  
> workers because of 'shutdown'
>     Thread #<Thread:0x2a98472468 sleep> is too old, killing.
>     Mon May 07 13:29:29 -0500 2007: Error calling  
> Dispatcher.dispatch #<Mongrel::TimeoutError: Mongrel timed out this  
> thread: shutdown>Thread #<Thread:0x2a98597b68 sleep> is too old,  
> killing.
>
> A restart of the mongrel, fixes it, but it doesn't last.
> I have been trying to use the gdb to to gain some insight as the  
> the root cause.
> Using the examples I found on the web,, the following was suggested
>
>     (gdb) set $ary = (int)backtrace(-1)
>     (gdb) set $count = *($ary+8)
>     (gdb) set $index = 0
>     (gdb) while $index < $count
>     >  x/1s *((int)rb_ary_entry($ary, $index)+12)
>     >  set $index = $index + 1
>     >end
>
> However, I get an error on the second line
>     "(gdb) set $count = *($ary+8)
>     Cannot access memory at address 0xffffffff985779d8"
>
> Has anyone seen this before?
>
> Cheers,
> Nathan C.
>
>
> -- 
> Together we can solve any issue.
> _______________________________________________
> Mongrel-users mailing list
> Mongrel-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/mongrel-users

-- Ezra Zygmuntowicz 
-- Lead Rails Evangelist
-- ez at engineyard.com
-- Engine Yard, Serious Rails Hosting
-- (866) 518-YARD (9273)




More information about the Mongrel-users mailing list