mod_fcgid tips

| | Comments (0) | TrackBacks (0)

Make sure you set IPCCommTimeout to at least 45 to allow enough startup
time.
Set DefaultMaxClassProcessCount to 2 unless your benchmarks tell you to
change.
Set IdleTimeout to 3600 or higher since your only have 2 dispatch.fcgi.
Set ProcessLifeTime to a multiple of IdleTimeout.
Set MaxProcessCount > DefaultMaxClassProcessCount so you can use
mod_fcgid for other things than rails.

mod_fcgid religiously kills idle or old processes so keep IdleTimeout
and ProcessLifeTime to high values.

Here is an example 'starter' /etc/apache2/mods-enabled/fcgid.conf


AddHandler fcgid-script .fcgi
SocketPath /var/lib/apache2/fcgid/sock
IdleTimeout 3600
ProcessLifeTime 7200
MaxProcessCount 8
DefaultMaxClassProcessCount 2
IPCConnectTimeout 8
IPCCommTimeout 60
DefaultInitEnv RAILS_ENV production

If you have plenty of RAM, then increase DefaultMaxClassProcessCount to
about 2*CPU--assume each instance will eat 20-30MB RAM.

0 TrackBacks

Listed below are links to blogs that reference this entry: mod_fcgid tips.

TrackBack URL for this entry: http://www.megalinux.net/cgi-bin/mt/mt-tb.fcgi/69

Leave a comment

About this Entry

This page contains a single entry by Ram Prasad published on December 28, 2006 5:59 PM.

mod_fcgid: couldn't bind unix domain socket was the previous entry in this blog.

Sed Oneliners - Handy sed scripts for text parsing is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Powered by
Movable Type 4.01