Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

Without a hack, you cannot easily do this.

The hack would be to have a shell script that BluePill starts, which monitors the processes you care about, and if something is exceeded, exits in such a way BluePill will detect as a failure.

I use this sort of thing to monitor my systems, but it is a cron job that runs once every 5 minutes. It's not perfect.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.