Feed on Posts or Comments

Linux 相關 Aaron on 29 四月 2009 11:57 下午

Squid tuning – max_filedsesc

AddThis Social Bookmark Button

一般初階的 squid 設定預設值大多是以 1024 為主,所以要有效打破限制就得再進一步的設定,不然會有以下二種錯誤訊息

————error_message———-
comm_open: socket failure: (24) Too many open files
WARNING! Your cache is running out of filedescriptors
————————————

1. /etc/squid/squid.conf
  最後一行新增 max_filedesc 65536

 2. /etc/rc.d/rc.local
  新增 ulimit -HSn 65536

 3. /usr/include/bits/typesizes.h
  修改 #define __FD_SETSIZE 65536

 4. service squid restart

Trackback This Post | Subscribe to the comments through RSS Feed

Leave a Reply