今天发现服务器流量突然降下来了,查看服务器发现squid建立了大量连接。查看squid的cache日志,发现以下信息
[quote]2011/10/19 09:34:13| client_side.cc(2980) okToAccept: WARNING! Your cache is running out of filedescriptors[/quote]
解决方法:
squid各个版本有差异,squid/3.1.3 不支持配置文件中添加配置项:max_filedesc或max_filedescriptors,需要在编译时添加参数。
squid 3.1.3:
[quote] --with-filedescriptors=NUMBER
Force squid to support NUMBER filedescriptors[/quote]
查看Squid相关状态
[quote]
# /byread/bin/squid/bin/squidclient -h 192.168.3.147 mgr:info|grep file
Maximum number of file descriptors: 1024
Largest file desc currently in use: 200
Number of file desc currently in use: 188
Available number of file descriptors: 836
Reserved number of file descriptors: 100
Store Disk files open: 173
[/quote]
[quote]2011/10/19 09:34:13| client_side.cc(2980) okToAccept: WARNING! Your cache is running out of filedescriptors[/quote]
解决方法:
squid各个版本有差异,squid/3.1.3 不支持配置文件中添加配置项:max_filedesc或max_filedescriptors,需要在编译时添加参数。
squid 3.1.3:
[quote] --with-filedescriptors=NUMBER
Force squid to support NUMBER filedescriptors[/quote]
查看Squid相关状态
[quote]
# /byread/bin/squid/bin/squidclient -h 192.168.3.147 mgr:info|grep file
Maximum number of file descriptors: 1024
Largest file desc currently in use: 200
Number of file desc currently in use: 188
Available number of file descriptors: 836
Reserved number of file descriptors: 100
Store Disk files open: 173
[/quote]
本文详细介绍了Squid缓存服务器流量下降的原因,通过查看日志发现Squid建立大量连接导致文件描述符耗尽,并提供了针对不同Squid版本的解决方法,包括编译时添加参数来支持更多文件描述符,以及检查和调整当前服务器的状态。
4114

被折叠的 条评论
为什么被折叠?



