- 论坛徽章:
- 0
|
环境:CentOS 5.4 final + squid-3.0.STABLE25-1.el5(yum安装)
症状:squid 会不定时出现拒绝服务,内网无法上网,重新启动squid即可暂时解决问题,但过几天又会出现
日志:出现以上症状时,日志会出现Warning your cache is running out of file descriptor
原因:已找出原因为 文件描述 设定值太小
我知道可以通过重新编译安装来解决问题,我想问的是可否在不重新编译安装的情况下增加 文件描述 限定值呢?
google后发现有文章说可以通过如下修改squid.conf进行修改
Set max_filedesc under RHEL / Red Hat / CentOS / Fedora Linux
Stop the Squid as changes of this value isn't respected by reconfigure command. This value should be changed only if there isn't any active squid process.
# service squid stop
Open /etc/squid/squid.conf file
# vi /etc/squid/squid.conf
Append / add / modify max_filedesc directive:
max_filedesc 4096
Save and close the file. Start the squid proxy server:
# service squid start
但是我尝试了squid 3.0/3.1的版本,在squid.conf中添加max_filedesc 4096后都无法通过squid -k check的语法检查,提示如下:- 2010/07/28 09:31:03| cache_cf.cc(362) parseOneConfigFile: squid.conf:2 unrecognized: 'max_filedesc'
复制代码 请教各位高手们,file descriptors的限定值到底可不可以通过squid.conf里进行设定呢?如果可以squid 3.0/3.1到底应该应该如何设定?
小弟在此先谢过啦。 |
|