mod_fcgid Slow Startup on Ubuntu Fix 1

Posted by Tony Buser Fri, 28 Jul 2006 01:20:00 GMT

I recently switched to using modfcgid instead of modfastcgi. So far its nice and fast... except for the first hit after a period of inactivity. This is because fcgid kills off idle processes and it takes an annoyingly long time to start one up on this server. It turns out there is an option to set a minimum number of processes, however the version of mod_fcgid on Ubuntu Breezy doesn't have it. Here's how I installed it:

sudo apt-get install apache2-dev

Download mod_fcgid 1.09 or greater

Edit it's Makefile and change top_dir = /usr/share/apache2

make

cp .libs/mod_fcgid.so /usr/lib/apache2/modules

Edit /etc/apache2/mods-available/fcgid.conf and add a line that says DefaultMinClassProcessCount 3 and restart apache.

The first hit after a restart will be slow, but from then on it will maintain at least DefaultMinClassProcessCount processes.

Trackbacks

Use the following link to trackback from your own site:
http://juju.org/articles/trackback/389

Comments

Leave a response, Track co.mments

  1. Avatar
    Andy Mon, 31 Jul 2006 12:59:22 GMT

    Thanks for the tip, it really helped out!

    I was using mod_fcgid 1.08, and when I looked at the change list, it looks like the default for 1.09+ should be to have DefaultMinClassProcessCount set to 3, so you might not actually have to make that change in the config files. (I did it anyway, just to be safe, but then again, I do that sort of thing)

Comments