LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
12
返回列表 发新帖
楼主: neiou

大流量的网站的配置问题。

[复制链接]
发表于 2006-9-2 20:41:33 | 显示全部楼层
请说明 用的什么linux 发行版 apache版本 是否自己编译 自编译用的什么参数
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-9-2 23:16:29 | 显示全部楼层
Red Hat Enterprise Linux AS4 x86 版 字符界面 最小安装

所有设备驱动正常。

apache 2.0.59
编译参数:
./configure
--enable-auth-digest
--enable-expires --enable-cache --enable-disk-cache --enable-mem-cache
--enable-so --with-mpm=worker

==================
MPM_WORKER
==================
<IfModule worker.c>
    ServerLimit          25
    ThreadLimit         200
    StartServers          3
    MaxClients         2000
    MinSpareThreads      25
    MaxSpareThreads     200
    ThreadsPerChild     100
    MaxRequestsPerChild   0
</IfModule>
回复 支持 反对

使用道具 举报

发表于 2006-9-3 21:25:57 | 显示全部楼层
是不是 每个程序打开的文件数的限制

cat /proc/sys/fs/file-max 看看是什么值

还有,可以用(ulimit -n 值) 来设定程序可以打开的文件数的最大值。

2006-09-02 19:37:35: (connections.c.1238) accept failed: Too many open files 24
2006-09-02 19:37:35: (connections.c.1238) accept failed: Too many open files 24
2006-09-02 19:37:35: (connections.c.1238) accept failed: Too many open files 24
2006-09-02 19:37:35: (connections.c.1238) accept failed: Too many open files 24
2006-09-02 19:37:35: (connections.c.1238) accept failed: Too many open files 24
2006-09-02 19:37:35: (connections.c.1238) accept failed: Too many open files 24
2006-09-02 19:37:35: (connections.c.1238) accept failed: Too many open files 24
2006-09-02 19:37:35: (connections.c.1238) accept failed: Too many open files 24
2006-09-02 19:37:35: (connections.c.1238) accept failed: Too many open files 24
回复 支持 反对

使用道具 举报

发表于 2006-9-4 13:44:56 | 显示全部楼层
2.2的性能自认为比2.0好不少,还增加了缓存命令。建议你使用。但是有几条命令,模块不同了,需要你修改 httpd。conf
----------------------------------------
CacheDefaultExpire 86400
MCacheSize 11111
MCacheMinObjectSize 2222
MCacheMaxObjectSize 333
MCacheMaxObjectCount 444
这些命令在2.0中是要先栽入扩展模块彩管用的。
----------------------------------------------------------
只能用1种工作模式,这是在编译的时候确定的。你是用 work编译的所以

APACHE2 中这样配置。
<IfModule prefork.c>
StartServers 10
MinSpareServers 10
MaxSpareServers 20
ServerLimit 20000
MaxClients 4000
MaxRequestsPerChild 0
</IfModule>

---------------------
这些命令毫无用处。

建议你用 prefork 模式编译2.2来用。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表