免费注册 查看新帖 |

Chinaunix

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

[proxy] squid导致的硬盘只读问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2010-08-30 10:24 |只看该作者 |倒序浏览
各位大大,最近我的squid的服务器很奇怪,老是出现内存溢出,Squid频繁重启,但是有时候重启的时候,在cache_dir目录重建完成以后出现了cache_dir目录只读问题,只能进行格式话,请各位老大帮忙看看啥问题啊?
系统centos5.4
squid:squid-2.6.STABLE22
swap:4G,内存也是4G,整个系统就跑一个squid,我的cache_mem 设置为3000M,大家再看下面的错误日志:
FATAL: xcalloc: Unable to allocate 1 blocks of 4108 bytes!

Squid Cache (Version 2.6.STABLE22): Terminated abnormally.
(squid)[0x80c34d6]
(squid)[0x80c3599]
(squid)[0x80e5e64]
(squid)[0x809da6f]
(squid)[0x80b81e3]
(squid)[0x80ba159]
(squid)[0x808c079]
(squid)[0x808d06d]
(squid)[0x80721ef]
(squid)[0x809be28]
/lib/libc.so.6(__libc_start_main+0xdc)[0x251e9c]
(squid)(i2d_SSL_SESSION+0x355)[0x804bdb1]
CPU Usage: 467.400 seconds = 184.970 user + 282.430 sys
Maximum Resident Size: 0 KB
Page faults with physical i/o: 21
Memory usage for squid via mallinfo():
        total space in arena:  -1106184 KB
        Ordinary blocks:       -1106188 KB      6 blks
        Small blocks:               0 KB      0 blks
        Holding blocks:         45256 KB      4 blks
        Free Small blocks:          0 KB
        Free Ordinary blocks:       3 KB
        Total in use:          -1060932 KB 100%
        Total free:                 3 KB 0%
2010/08/28 20:25:13| ctx: enter level  0
2010/08/28 20:25:13| storeDirWriteCleanLogs: Starting...
2010/08/28 20:25:13| WARNING: Closing open FD   14
2010/08/28 20:25:13| commSetEvents: epoll_ctl(EPOLL_CTL_DEL): failed on fd=14: (1) Operation not permitted
2010/08/28 20:25:16| Starting Squid Cache version 2.6.STABLE22 for i686-pc-linux-gnu...
2010/08/28 20:25:16| Process ID 4298
2010/08/28 20:25:16| With 188130 file descriptors available
2010/08/28 20:25:16| Using epoll for the IO loop
2010/08/28 20:25:16| Performing DNS Tests...
2010/08/28 20:25:16| Successful DNS name lookup tests...
2010/08/28 20:25:16| DNS Socket created at 0.0.0.0, port 43075, FD 6
2010/08/28 20:25:16| Adding nameserver ×.*.*.* from /etc/resolv.con
2010/08/28 20:25:16| Adding nameserver *.*.*.* from /etc/resolv.conf
2010/08/28 20:25:16| User-Agent logging is disabled.
2010/08/28 20:25:16| Referer logging is disabled.
2010/08/28 20:25:16| Unlinkd pipe opened on FD 11
2010/08/28 20:25:16| Swap maxSize 41943040 + 3072000 KB, estimated 0 objects
2010/08/28 20:25:16| Target number of buckets: 173134
2010/08/28 20:25:16| Using 262144 Store buckets
2010/08/28 20:25:16| Max Mem  size: 3072000 KB
2010/08/28 20:25:16| Max Swap size: 41943040 KB
2010/08/28 20:25:16| Store logging disabled
2010/08/28 20:25:16| Rebuilding storage in /data/cache1 (DIRTY)
2010/08/28 20:25:16| Rebuilding storage in /data/cache2 (DIRTY)
2010/08/28 20:25:16| Using Least Load store dir selection
2010/08/28 20:25:16| Current Directory is /data
2010/08/28 20:25:16| Loaded Icons.
2010/08/28 20:25:16| Accepting accelerated HTTP connections at 0.0.0.0, port 80, FD 14.
2010/08/28 20:25:16| Accepting SNMP messages on port 3401, FD 15.
2010/08/28 20:25:16| WCCP Disabled.
2010/08/28 20:25:16| Configuring Parent *.*.*.*
2010/08/28 20:25:16| Ready to serve requests.
2010/08/28 20:25:17| Store rebuilding is  1.8% complete
2010/08/28 20:25:21| Done reading /data/cache1 swaplog (222464 entries)
2010/08/28 20:25:21| Done reading /data/cache2 swaplog (223970 entries)
2010/08/28 20:25:21| Finished rebuilding storage from disk.
2010/08/28 20:25:21|    441958 Entries scanned
2010/08/28 20:25:21|         0 Invalid entries.
2010/08/28 20:25:21|         0 With invalid flags.
2010/08/28 20:25:21|    441737 Objects loaded.
2010/08/28 20:25:21|         0 Objects expired.
2010/08/28 20:25:21|      2749 Objects cancelled.
2010/08/28 20:25:21|       660 Duplicate URLs purged.
2010/08/28 20:25:21|        61 Swapfile clashes avoided.
2010/08/28 20:25:21|   Took 5.0 seconds (88652.5 objects/sec).
2010/08/28 20:25:21| Beginning Validation Procedure
2010/08/28 20:25:21|    262144 Entries Validated so far.
2010/08/28 20:25:21|   Completed Validation Procedure
2010/08/28 20:25:21|   Validated 438488 Entries
2010/08/28 20:25:21|   store_swap_size = 26097308k
2010/08/28 20:25:22| storeLateRelease: released 14 objects
2010/08/29 00:32:28| storeUfsCreate: Failed to create /data/cache1/03/AF/0003AF8A ((30) Read-only file system)
2010/08/29 00:32:28| storeUfsCreate: Failed to create /data/cache1/03/AF/0003AF8B ((30) Read-only file system)
2010/08/29 00:32:28| storeUfsCreate: Failed to create /data/cache1/03/AF/0003AF8C ((30) Read-only file system)

这个是squid运行下系统的状态:
top - 10:22:30 up 6 days, 16:25,  1 user,  load average: 0.11, 0.09, 0.02
Tasks:  87 total,   1 running,  86 sleeping,   0 stopped,   0 zombie
Cpu(s):  0.2%us,  0.3%sy,  0.0%ni, 98.0%id,  1.3%wa,  0.0%hi,  0.2%si,  0.0%st
Mem:   4155116k total,  3459760k used,   695356k free,   102840k buffers
Swap:  4192924k total,       56k used,  4192868k free,  2646076k cached


请各位老大帮忙解决哈啊,被这个问题快搞死了~

论坛徽章:
0
2 [报告]
发表于 2010-08-30 11:33 |只看该作者
先把cache_mem 改改看,据说这个超过物理内存三分之一不稳定...如果你是8G内存的话可以设置3000M

论坛徽章:
0
3 [报告]
发表于 2010-08-30 11:37 |只看该作者
chmod -R 777 /usr/local/squid/var/

还有缓存目录创建允许当前用户读写的最高权限了吗

论坛徽章:
0
4 [报告]
发表于 2010-08-31 11:17 |只看该作者
先把cache_mem 改改看,据说这个超过物理内存三分之一不稳定...如果你是8G内存的话可以设置3000M
qczl1224 发表于 2010-08-30 11:33



      这个我倒是想过,但是我其它的服务器内存设置的也是一样啊,但是其它的基本没出过这个问题呢?

论坛徽章:
0
5 [报告]
发表于 2010-08-31 11:25 |只看该作者
chmod -R 777 /usr/local/squid/var/

还有缓存目录创建允许当前用户读写的最高权限了吗
qczl1224 发表于 2010-08-30 11:37



      这个我倒没给最高权限,我的权限是755,所有者给了squid的账户,应该也没问题吧。

论坛徽章:
0
6 [报告]
发表于 2010-08-31 11:25 |只看该作者
高手来啊,有遇到过这种问题的帮小弟提醒哈哪里的问题啊~谢谢
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP