squid!Your cache is running out of file
[20140221]squid WARNING! Your cache is running out of filedescriptors.txt
--這一陣子,我們的代理出現一些問題.
--我檢查發現如下:
2014/02/21 14:53:10| client_side.cc(2993) okToAccept: WARNING! Your cache is running out of filedescriptors
--看來檔案描述設定太小,前面的管理人員設定有問題.我google,找到一些連結:
# squidclient -p 31888 mgr:info | grep 'file descri'
Maximum number of file descriptors: 1024
Available number of file descriptors: 12
Reserved number of file descriptors: 100
--注意這樣寫不行.squidclient mgr:info -p 31888 ,Available number of file descriptors已經很小.
--增加file descriptors的方法,修改/etc/security/limits.conf:
Squid increase the maximum file descriptors
First, update /etc/security/limits.conf file:
# vi /etc/security/limits.conf
Append following line to increase current limit from 1024 to 4096:
* - nofile 4096
Save and close the file. You must re-login to check new limits:
# ulimit -a | grep 'open files'
Sample output:
open files (-n) 4096
Next you need to set the maximum number of open file descriptors by modifying squid proxy server configuration as per
your Linux distribution.
Set max_filedesc under RHEL / Red Hat / CentOS / Fedora Linux
Stop the Squid as changes of this value isn't respected by reconfigure command. This value should be changed only if
there isn't any active squid process.
# service squid stop
Open /etc/squid/squid.conf file
# vi /etc/squid/squid.conf
Append / add / modify max_filedesc directive:
max_filedesc 4096
Save and close the file. Start the squid proxy server:
# service squid start
Now again run squidclient command or check log files for messages:
# squidclient mgr:info
Set max_filedesc under Ubuntu / Debian Linux
First, stop squid proxy server, enter:
# /etc/init.d/squid stop
OR
$ sudo /etc/init.d/squid stop
Open /etc/default/squid to set max. number of filedescriptors to use. You can increase this on a busy
cache to a maximum of (currently) 4096 filedescriptors. Default is 1024.
$ sudo vi /etc/default/squid
OR
# vi /etc/default/squid
Now set SQUID_MAXFD:
SQUID_MAXFD=4096
Save and close the file. Start the squid proxy server:
$ sudo /etc/init.d/squid start
Verify that it is working with new limits:
# squidclient mgr:info | grep 'file descri'
--我選擇第1種方式修改.增加到65536.要重啟squid就可以了.
# squidclient -p 31888 mgr:info | grep -A7 'File descriptor usage for squid'
File descriptor usage for squid:
Maximum number of file descriptors: 65536
Largest file desc currently in use: 2388
Number of file desc currently in use: 2248
Files queued for open: 0
Available number of file descriptors: 63288
Reserved number of file descriptors: 100
Store Disk files open: 4
--可以發現現Number of file desc currently in use增加到2248.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-1085012/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Running the app on your deviceAPPdev
- Resource is out of sync with the file system
- EF:split your EDMX file into multiple diagrams
- web cache server方案比較:varnish、squid、nginxWebServerUINginx
- Eclipse:Resource is out of sync with the file systemEclipse
- FATAL: Failed to make swap directory /etc/squid/cache: (13) Permission deniedAIUI
- 【問題處理】Oracle process running out of OS kernel I/O resourcesOracle
- 【構建Android快取模組】(二)Memory Cache & File CacheAndroid快取
- ERROR 1290:The MySQL server is running with the --secure-file-priv optionErrorMySqlServer
- Myeclipse:resource is out of sync with the file system的解決辦法Eclipse
- Load of cache file failed. rc=1301AI
- squidUI
- 解決eclipse中出現Resource is out of sync with the file system問題Eclipse
- Flush an Object Out The Library Cache [SGA] Using The DBMS_SHARED_POOLObject
- Oracle RDBMS : Flushing a Single SQL Statement out of the Object Library CacheOracleSQLObject
- MySQL 報錯 ERROR 1290 (HY000): running with the --secure-file-privMySqlError
- Mysql 報The MySQL server is running with the --secure-file-priv option so it cannot execute this stat...MySqlServer
- Your account has been locked out. Please contact the system administrator for further assistance.
- MySQL 事務RUNNING狀態引發的Transaction timed out: deadline問題MySql
- Squid for windowUI
- 修復 Ubuntu 中 “E: The package cache file is corrupted, it has the wrong hash”UbuntuPackage
- 解決Eclipse/STS 中出現Resource is out of sync with the file system 的異常Eclipse
- ERROR 23 (HY000) at line 29963: Out of resources when opening fileError996
- Your Prediction Gets As Good As Your DataGo
- Squid with AD authenticationUI
- squid官方faqUI
- squid實踐UI
- Vi and Vim Autocommand: 3 Steps to Add Custom Header To Your File AutomaticallyHeader
- squid 簡單配置UI
- Squid 3.2.2 釋出UI
- Your title
- squid反向代理安全控制UI
- squid代理伺服器UI伺服器
- Squid 工作的原理(轉)UI
- cron輔助squid(轉)UI
- 上傳報錯:Upload Failed: Your upload has failed a virus scan. Please choose another file.AI
- Check the transaction running in oracleOracle
- Long running Operations in OracleOracle