» 您尚未 登录   注册 | 社区服务 | 帮助 | 社区 | 无图版


承德互联 承德互联 » PHP+Mysql+Apache » mod_fcgid tips
 XML   RSS 2.0   WAP 

--> 本页主题: mod_fcgid tips 加为IE收藏 | 收藏主题 | 上一主题 | 下一主题
admin



级别: 管理员
精华: 1
发帖: 4646
威望: 47 点
金钱: 23190 RMB
贡献值: 0 点
注册时间:2006-10-09
最后登录:2008-12-04
查看作者资料 发送短消息 推荐此帖 引用回复这个帖子

mod_fcgid tips

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.


http://www.megalinux.net/archives/641.html


[楼 主] | Posted: 2007-07-17 09:51 顶端

承德互联 -> PHP+Mysql+Apache





Powered by PHPWind v6.3.2 Code © 2003-06 PHPWind
Total 0.025322(s) query 5, Time now is:12-05 08:19, Gzip enabled

You can contact us