How can I setup BluePill to Monitor a Rails App Running via Passenger (mod_rails)
Posted
by Jim Jeffers
on Server Fault
See other posts from Server Fault
or by Jim Jeffers
Published on 2009-12-14T12:42:39Z
Indexed on
2010/04/07
5:03 UTC
Read the original article
Hit count: 416
I recently launched a site running phusion passenger. Unfortunately, the site went down due to a frozen thread. I was able to save the server by doing kill -9 to the specific PID. Still though, I thought passenger was able to manage this automatically. I have a server with 1GB of memory running one rails app with passenger allotted up to 7 instances. However, when I came to discover the site went down I found that passenger had spawned 6 instances with one of them using up over 800mb of memory causing the server to swap.
As a result I am hoping to setup something like bluepill on the server but I'm slightly confused as to how you go about doing it. Mainly because bluepill expects to start/stop the processes it's monitoring. However, in our case, passenger already restarts processes for us so we only need to monitor the pids of passengers instances and kill them once they've gotten too large.
Has anyone here setup BluePill to monitor a rails app running under phusion's passenger? Any insight would be useful.
© Server Fault or respective owner