Mongrel freezing – monitoring tools

My Mongrel staging server ‘freezes’ after 2-3 days of uptime. Nothing in the logs, of course. No abnormal memory usage increase.

The first sollution was: Supervize +  bash script that restarted the server if a http request received a timeout. However, this is an ugly sollution.

Below are some of the monitoring/debugging tools i have found after a little bit of research.

This is a simple plugin for Mongrel which changes the process title to reflect
what it’s currently doing. You can then determine a given Mongrel server’s
status using “ps”.

For example:

mongrel_rails [10010/2/358]: handling HEAD /feed/cal/global/91/6de4
| | | | | |
| | | | | The current req (method / path)
| | | | |
| | | | The client IP
| | | |
| | | What it’s doing
| | |
| | Requests processed during server lifetime
| |
| Requests currently queued/being processed concurrently
The port that Mongrel is serving

  • I have found a good alternative to supervise + bash script:  The god project:

* Config file is written in Ruby
* Easily write your own custom conditions in Ruby
* Supports both poll and event based conditions
* Different poll conditions can have different intervals
* Integrated notification system (write your own too!)
* Easily control non-daemonizing script

I’ll come back with a new post after i have tried the above sollutions. Hopefully, i will also find what is the cause of the mongreil freezes.

One Response

  1. Hi,

    We’re facing similar problems on the production servers for a Java application. So for my bachelor’s thesis I’ll be working on an app which tries to predict such behaviour (specifically, the output will be the probability that the Java application fails in the next X minutes) by monitoring different stats. So maybe we can exchange some general ideas on situations like this.

    Good luck with your new blog!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: