- 论坛徽章:
- 0
|
有没有人研究过这个问题?目前我cache3000多万个object,出现squid进程自动重启了
具体的错误是
- FATAL: xcalloc: Unable to allocate 1 blocks of 1048640 bytes!
- Squid Cache (Version 2.6.STABLE20): Terminated abnormally.
- CPU Usage: 49892.603 seconds = 43028.331 user + 6864.272 sys
- Maximum Resident Size: 0 KB
- Page faults with physical i/o: 24
- Memory usage for squid via mallinfo():
- total space in arena: -130412 KB
- Ordinary blocks: -131780 KB 833 blks
- Small blocks: 0 KB 0 blks
- Holding blocks: 106564 KB 124 blks
- Free Small blocks: 0 KB
- Free Ordinary blocks: 1367 KB
- Total in use: -25216 KB 106%
- Total free: 1367 KB -5%
- 2008/09/25 20:46:55| storeDirWriteCleanLogs: Starting...
- 2008/09/25 20:46:55| WARNING: Closing open FD 71
- 2008/09/25 20:46:55| commSetEvents: epoll_ctl(EPOLL_CTL_DEL): failed on fd=71: (1) Operation not permitted
- 2008/09/25 20:46:55| WARNING: Closing open FD 72
- 2008/09/25 20:46:55| commSetEvents: epoll_ctl(EPOLL_CTL_DEL): failed on fd=72: (1) Operation not permitted
- 2008/09/25 20:46:57| Finished. Wrote 0 entries.
- 2008/09/25 20:46:57| Took 2.3 seconds ( 0.0 entries/sec).
- 2008/09/25 20:47:01| Starting Squid Cache version 2.6.STABLE20 for x86_64-unknown-linux-gnu...
复制代码
我的存储方式是COSS
查了squid的FAQ,好像并不能解决我的问题
http://man.chinaunix.net/newsoft/squid/Squid_FAQ/FAQ-8.html#ss8.7 虽然有xmalloc: Unable to allocate的解释
Messages like "FATAL: xcalloc: Unable to allocate 4096 blocks of 1 bytes!" appear when Squid can't allocate more memory, and on most operating systems (inclusive BSD) there are only two possible reasons:
The machine is out of swap
The process' maximum data segment size has been reached
附上我的内存信息
- # free
- total used free shared buffers cached
- Mem: 8161516 8119484 42032 0 82800 3760492
- -/+ buffers/cache: 4276192 3885324
- Swap: 2096472 208 2096264
复制代码
附上一些squid的相关配置信息:
- cache_mem 512 MB
- cache_dir coss /cache/coss1 8000 membufs=100 max-size=128000
- .........................................................
- cache_dir coss /cache/coss29 8000 membufs=100 max-size=128000
- cache_dir coss /cache/coss30 8000 membufs=100 max-size=128000
- store_avg_object_size 25 KB
- store_objects_per_bucket 500
- memory_pools off
复制代码
[ 本帖最后由 killua 于 2008-10-7 10:14 编辑 ] |
|