免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3773 | 回复: 3
打印 上一主题 下一主题

大家的Squid开了多少dnsserver进程? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-12-02 14:37 |只看该作者 |倒序浏览
我的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 编辑 ]

论坛徽章:
0
2 [报告]
发表于 2008-12-02 15:14 |只看该作者
路过的进来看看吧.

论坛徽章:
0
3 [报告]
发表于 2008-12-02 15:18 |只看该作者

回复 #1 fine102 的帖子

我这里没有使用--disable-internal-dns

论坛徽章:
0
4 [报告]
发表于 2008-12-02 15:23 |只看该作者
感谢kns1024wh回答,虽然他的环境和我不同.
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP