How to reduce the number of FastCGI processes

Hi !

My RoR app starts 8 (yes 8) FastCGI instances when I hit it after a killall -9 dispatch.fcgi:
[pico]$ ps aux | grep dispatch | wc -l

How do I reduce that number ? That’s supposed to be configured in Apache’s configuration files, not anywhere I can get my hands on, right ?

Thanks !

As you said, that’s part of the httpd.conf files and is nothing we can touch.

FastCGI is configured this way on purpose, 8 is a decent number of servers to handle requests for a website with a pretty good amount of traffic.

Rather than fire up new FastCGI servers as the need exists, it’s best to configure it to fire up all servers possible, then they will be there when the need arises. They do not have a big footprint and obviously Dreamhost isn’t concerned (otherwise they would have specified a lower number of FastCGI servers to be created.

Don’t worry about it :wink:

I understand 8 is good enough, but I just found 21 this afternoon… There must be something wrong somewhere, no ? This app is running in dev mode, although I don’t do dev on DreamHost’s computers.

This app is hosted on pico, and I have another one on cortes in production mode which is running along quite nicely at 8 instances.

So, should I just switch to production and kill processes when I want to upload a new version for my customer to see ?


It really depends on the virtual server configuration settings, which may vary from host to host. Either way, each virtual server will have a specified number of FastCGI servers running; however, they will all be running under your specified user account hence the listing of 21 processes.

I’m totally new to all this, but I just read a little bit about FastCGI and all that good stuff in the book “Agile Web Development with Rails”. If you have this book, page 460 is where you want to look.

Hi !

I have only one application, so those 21 processes would be for one single application.

I do have the Agile Rails Book, and will re-read the deployment section ASAP.

Thanks !