[Mongrel] Mongrel stops responding after period of inactivity
list at lylo.co.uk
Sun Jul 29 17:57:29 EDT 2007
I posted this to the Ruby on Rails Talk group but I thought I'd post it here
too as it's probably a more appropriate group. Hope this is ok.
I'm running a 2-instance Mongrel cluster behind Apache 2.2.4 with Rails
1.2.3. If no requests are received by the application for several hours
(this usually happens overnight) then Mongrel stops
responding and no requests are detected by Rails (at least nothing is in the
Rails log). Nothing untoward is in the Mongrel log.
If you try and visit the application, the request times out with a 502 Proxy
Error. Apache is still up and running and serving static files without a
problem, but the following is present in the Apache error log (from trying
to hit the SessionController, identified by / sessions) which may provide a
[Sun Jul 29 08:37:36 2007] [error] proxy: error reading status line from
remote server 127.0.0.1
[Sun Jul 29 08:37:36 2007] [error] proxy: Error reading from remote
server returned by /sessions
Restarting the Mongrel cluster resolves the problem until the next time it
happens. I have done a lot of reading about this issue online and a number
of sources -- including the Mongrel FAQ -- point to being able to fix a
'hanging mongrel' situation by setting this value in environment.rb:
ActiveRecord::Base.verification_timeout = 14400
This make the ActiveRecord timeout value less than the MySQL default of
28800. I have made this change and it doesn't appear to make a difference.
Can anyone advise me on what to try next to diagnose this issue?
I'm quickly running out of ideas and I'd appreciate a bit of help!
Here are the vitals from our Ubuntu 6.0.6 server:
Ver 14.12 Distrib 5.0.22, for pc-linux-gnu (x86_64) using readline
ruby 1.8.6 (2007-03-13 patchlevel 0) [x86_64-linux]
Mongrel Cluster Config:
user: [the user]
group: [the group]
Apache Load Balancer setup:
Apache Loaded Modules:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mongrel-users