When you start working with background jobs, you’re going to want a reliable way to monitor those processes. I first started out with monit. I found its configuration file a bit ugly. Here is an example config file:
And that’s just one process!
Also ran into lots of problems where the pid file wasn’t being found, etc. What happens when the pid file doesn’t exist? Should it be created? What if there is already a pid file that didn’t get deleted properly last time? These are all problems a process manager should solve.
I tried bluepill next. The configuration syntax is nice, its written in ruby.
However it seemed painfully slow. Also I’m afraid I have to agree with this rather brief and undetailed bug report from Jeff Atwood:
So I found a more recent project called eye. Its inspiration comes from bluepill but its incredibly fast and has worked very reliably for me.
The configuration is quite nice:
You can add more process blocks for more resque workers.
I’ve been using eye now to manage lots of different processes now including
hubots, sinatra apps, liquidsoap, etc. Its great to use with capistrano to
restart the processes on deploy. All you have to do is send your process or
group of processes the stop,start, restart commands. Be sure to reload your
config file to pick up any changes you may have made.
Now I am working on integrating eye with hubot to restart processes via chat!