我的squid版本是2.6.STABLE18
[squid@gd sbin]$ ./squid -v
Squid Cache: Version 2.6.STABLE18
我在一台生产机器上,squid编译加了--disable-internal-dns来使用外部dns,
而在squid配置中也添加了dns_children 80
可以看到squid的dnsserver进程数为80
[squid@gd etc]$ ps x |grep dnsserver |grep -v grep |wc -l
80
可是在cache.log中差不多每天都有出现以下的日志,
2008/10/2623:50:28| dnsSubmit: queue overload, rejecting www.china-designer.com
2008/10/26 23:50:28| dnsSubmit: queueoverload, rejecting zntx.org.cn
2008/10/26 23:50:28| dnsSubmit: queue overload, rejecting fywap.net
google后找到相关信息
Thismeans that you are using external dnsserverprocesses for lookups, and all processes arebusy, and Squid's pending queue is full. Each dnsserver program can only handleone request at a time. When all dnsserver processes are busy, Squid queues uprequests, but only to a certain point. Toalleviate this condition, you need to either (1) increase the number ofdnsserver processes by changing the value for dns_children in your config file,or (2) switch to using Squid's internal DNSclient code. Notethat in some versions, Squid limits dns_children to 32. To increase it beyond that value, you would have to editthe source code. 这里说某些版本只支持32个进程数,可是我ps x 能出现80个的话,那这80个dnsserver都有在处理dns查询.
之后,我尝试把dns_children 设置200,通过几天的观察后,该日志出现基本没有了,但是今天再次查看cache.log日志却又出来了二百多条 [squid@gd logs]$ grep 'queue overload' cache.log |wc -l 202
[squid@gd logs]$ grep 'queue overload' cache.log |more
2008/12/02 00:11:53| dnsSubmit: queue overload, rejecting lh6.ggpht.com
2008/12/02 00:11:53| dnsSubmit: queue overload, rejecting lh4.ggpht.com
2008/12/02 00:11:53| dnsSubmit: queue overload, rejecting lh5.ggpht.com
2008/12/02 00:11:53| dnsSubmit: queue overload, rejecting lh3.ggpht.com
2008/12/02 00:11:53| dnsSubmit: queue overload, rejecting mmmcr.com
请问各位同仁有没有碰到过相关的问题.
你们的编译时是否使用--disable-internal-dns
如果使用外部dns,dns_children这设置多少合适.
[ 本帖最后由 fine102 于 2008-12-2 14:38 编辑 ] |