Monitoring and managing fcgi processes using fcgimon

Manfred Stienstra

When we started using Switchtower Capistrano to deploy our projects, we had some trouble with Lighttpd herding the fcgi processes. Because the standard Capistrano tasks expect the processes to be managed externally anyway, we decided to stop using Lighttpd for this.

Most of the existing tools for managing fcgi processes are designed to do complex stuff like load balancing across different servers. What we needed was a simple tool for managing multiple Rails applications on a single server. So we wrote Fcgimon.

Fcgimon manages fcgi processes using the spinner and spawner scripts that come with Ruby On Rails.

FCGIMon screenshot

You specify all Rails applications and the number of fcgi processes you want to have running in a configuration file. Then use fcgimon to start or stop all fcgi processes for any single application, or start and stop all applications at once.

Fcgimon also generates snippets that can be included in the main Lighttpd configuration file. This makes it much easier to keep the number of running fcgi processes and the ports listed in the Lighttpd configuration file in sync.

You can download the latest version of Fcgimon from our Subversion repository. Please give it a try and tell us what you think.

You’re reading an archived weblog post that was originally published on our website.