[Mongrel] Weird freeze problem

Pete DeLaurentis pete at nextengine.com
Wed Nov 7 18:33:49 EST 2007


Hey Paul,

This sounds like the problem I've been hitting.  The folks on this  
group suggested updating the ActiveRecord timeout.

Apparently if one of your mongrels doesn't get any play for some  
amount of time, it automatically drops the database connection.  This  
in turn will cause your mongrel to become unresponsive.

Here's the change I made in environment.rb:

# Set the verification timeout so that the mongrel connection won't  
die if left alone (1 week)
ActiveRecord::Base.verification_timeout = 604800

So far so good, but I'll know more as  Iet it run for the next few  
days.  Hopefully there aren't any issues with setting a timeout this  
large.  Shout back to the group if this fixes it for you.

Thanks,
Pete

PS. Prior to finding this fix, I've been using monit to restart the  
servers when they become unresponsive.



On Nov 7, 2007, at 3:03 PM, Paul-Kenji Cahier wrote:

> Hello,
>
> I am running mongrel 1.1 in production mode behind a lighttpd with  
> mod_proxy.
> At first everything works fine, however, after a few days, the  
> mongrel servers stop answering at all, even if I try to connect to  
> them directly.
> I have checked logs but there is no sign of anything at all, and  
> even when there was not a single request for a few days, it did  
> freeze, and
> that on repeated occasions. What should I do to be able to find out  
> what is the problem, or to solve it?
>
> Thanks,
>
>
> -- 
> Best regards,
>  Paul-Kenji Cahier                         mailto:pkc at F1-Photo.com
>
> _______________________________________________
> Mongrel-users mailing list
> Mongrel-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/mongrel-users



More information about the Mongrel-users mailing list