免费注册 查看新帖 |

Chinaunix

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

[proxy] 那为兄弟帮忙看看这个squid问题。 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-05-15 10:32 |只看该作者 |倒序浏览
squid的cache_log里面的日志如下:

CPU Usage: 0.033 seconds = 0.020 user + 0.013 sys
Maximum Resident Size: 0 KB
Page faults with physical i/o: 0
Memory usage for squid via mallinfo():
        total space in arena:    3976 KB
        Ordinary blocks:         3896 KB      2 blks
        Small blocks:               0 KB      1 blks
        Holding blocks:          2292 KB      2 blks
        Free Small blocks:          0 KB
        Free Ordinary blocks:      79 KB
        Total in use:            6188 KB 99%
        Total free:                79 KB 1%
2007/05/14 12:12:44| Starting Squid Cache version 2.6.STABLE12 for i686-pc-linux-gnu...
2007/05/14 12:12:44| Process ID 25063
2007/05/14 12:12:44| With 1024 file descriptors available
2007/05/14 12:12:44| Using epoll for the IO loop
2007/05/14 12:12:44| Performing DNS Tests...
2007/05/14 12:12:44| Successful DNS name lookup tests...
2007/05/14 12:12:44| DNS Socket created at 0.0.0.0, port 49496, FD 5
2007/05/14 12:12:44| Adding nameserver 61.155.43.208 from squid.conf
2007/05/14 12:12:44| helperOpenServers: Starting 10 'redir.pl' processes
2007/05/14 12:12:44| Unlinkd pipe opened on FD 19
2007/05/14 12:12:44| Swap maxSize 134217728 KB, estimated 10324440 objects
2007/05/14 12:12:44| Target number of buckets: 516222
2007/05/14 12:12:44| Using 524288 Store buckets
2007/05/14 12:12:44| Max Mem  size: 1048576 KB
2007/05/14 12:12:44| Max Swap size: 134217728 KB
2007/05/14 12:12:44| Store logging disabled
2007/05/14 12:12:44| Rebuilding storage in /home/cache (DIRTY)
2007/05/14 12:12:44| Using Least Load store dir selection
2007/05/14 12:12:44| Set Current Directory to /home/cache
2007/05/14 12:12:44| Loaded Icons.
2007/05/14 12:12:44| Accepting transparently proxied HTTP connections at 0.0.0.0, port 80, FD 22.
2007/05/14 12:12:44| Accepting SNMP messages on port 3401, FD 23.
2007/05/14 12:12:44| WCCP Disabled.
2007/05/14 12:12:44| Ready to serve requests.
2007/05/14 12:12:44| Store rebuilding is  0.4% complete
2007/05/14 12:12:54| Done reading /home/cache swaplog (936588 entries)
2007/05/14 12:12:54| Finished rebuilding storage from disk.
2007/05/14 12:12:54|    724164 Entries scanned
2007/05/14 12:12:54|         0 Invalid entries.
2007/05/14 12:12:54|         0 With invalid flags.
2007/05/14 12:12:54|    721498 Objects loaded.
2007/05/14 12:12:54|         0 Objects expired.
2007/05/14 12:12:54|    199362 Objects cancelled.
2007/05/14 12:12:54|      2190 Duplicate URLs purged.
2007/05/14 12:12:54|       476 Swapfile clashes avoided.
2007/05/14 12:12:54|   Took 10.3 seconds (70181.6 objects/sec).
2007/05/14 12:12:54| Beginning Validation Procedure
2007/05/14 12:12:54|    262144 Entries Validated so far.
2007/05/14 12:12:54|   Completed Validation Procedure
2007/05/14 12:12:54|   Validated 522134 Entries
2007/05/14 12:12:54|   store_swap_size = 46136168k
2007/05/14 12:12:55| storeLateRelease: released 174 objects
2007/05/14 12:19:42| WARNING: 1 swapin MD5 mismatches
2007/05/14 12:19:54| WARNING: 10 swapin MD5 mismatches
2007/05/14 12:25:38| squidaio_queue_request: WARNING - Queue congestion
2007/05/14 12:43:43| squidaio_queue_request: WARNING - Queue congestion
2007/05/14 13:18:00| squidaio_queue_request: WARNING - Queue congestion
2007/05/14 13:28:11| parseHttpRequest: Unsupported method ':37:38'
2007/05/14 13:28:11| clientReadRequest: FD 31 (222.178.216.164:22482) Invalid Request
2007/05/14 14:09:49| WARNING! Your cache is running out of filedescriptors
2007/05/14 14:09:54| WARNING: All url_rewriter processes are busy.
2007/05/14 14:09:54| WARNING: up to 10 pending requests queued
2007/05/14 14:14:18| WARNING! Your cache is running out of filedescriptors
2007/05/14 14:14:34| WARNING! Your cache is running out of filedescriptors
2007/05/14 14:14:38| WARNING: All url_rewriter processes are busy.
2007/05/14 14:14:38| WARNING: up to 28 pending requests queued
2007/05/14 14:14:38| Consider increasing the number of url_rewriter processes to at least 38 in your config file.
2007/05/14 14:22:36| WARNING! Your cache is running out of filedescriptors
2007/05/14 14:22:41| WARNING: All url_rewriter processes are busy.
2007/05/14 14:22:41| WARNING: up to 48 pending requests queued
2007/05/14 14:22:52| WARNING! Your cache is running out of filedescriptors
2007/05/14 14:23:01| squidaio_queue_request: WARNING - Queue congestion
2007/05/14 14:33:05| WARNING! Your cache is running out of filedescriptors
2007/05/14 14:33:06| WARNING: All url_rewriter processes are busy.
2007/05/14 14:33:06| WARNING: up to 27 pending requests queued
2007/05/14 14:33:21| WARNING! Your cache is running out of filedescriptors



这些日志一出现,速度就很慢。。。



在官方也没有找到解决的办法。那问兄弟遇到这重情况。帮忙分析一下。是那里问题。

论坛徽章:
0
2 [报告]
发表于 2007-05-15 11:50 |只看该作者
WARNING! Your cache is running out of filedescriptors

超过文件连接数,所以会出现问题

1,ulimit -HSn 10240
2,编译squid
3,运行squid,这样squid的文件描述符就变成10240了

但这样有个问题就是重启,文件描述符就会失效,所以

vi /etc/rc.local,加入

ulimit -HSn 10240
/dir/squid/sbin/squid -N &  #启动squid

这样就行了,如果需要手动启动squid,请
vi /root/.bashrc添加
ulimit -HSn 10240

这样每次以root身份登陆后,环境的文件描述符就变成10240了,然后手动启动squid,squid的文件描述符就也是10240了

论坛徽章:
0
3 [报告]
发表于 2007-05-31 17:19 |只看该作者
liuhanzhao兄,谢谢了。

论坛徽章:
0
4 [报告]
发表于 2007-06-01 17:10 |只看该作者

debian 下安装的squid

我是在debian下安装的sqiud,配置完成后squid启用的是80端口,apache启用的是81端口。

squid和apache的端口都已经启用。


但是访问的时候,访问页面无法显示,squid的errorlog里会有
WARNING! Your cache is running out of filedescriptors
这样的警告。然后查看netstat -an |grep 80 |wc -l

937个链接

是在测试机上的,不可能有这么多链接
查看后发现
都是
192.168.0.200:****   192.168.0.200:80
本机的一些端口链接本机的80端口。


有哪位大侠能告诉我怎么解决这个问题吗?
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP