I’m using god* to monitor my mongrels. God looks at pid files to know
the status of the cluster. It seems as though mongrel does not write a
pid file until it has loaded the entire rails/project environment,
which in my case, takes upwards of 90 seconds. Meanwhile, god is
freaking out because it thinks that there aren’t mongrels running, and
it tries to start them. Thankfully I can set god’s “grace period” to 5
minutes, so I only get one false restart, but it would be nice to have
a different solution.
Short of patching god the only thing I can think of is some sort of
wrapper shell or ruby script that writes the pid ahead of time, but
even then, the pid would conflict with when mongrel wants to write a
pid-- I can’t think of a good way to delete the initial pid “just in
Any ideas are appreciated, or if the mongrel team is open to a patch
to write the pid much earlier, I can try to put that together.