Wednesday, January 18, 2017

CentOS 6 Squid 'Your cache is running out of filedescriptors'

  1. [root@localhost ~]# grep 'Your cache is running out of filedescriptors' /var/log/squid/cache.log
    2017/01/18 11:41:42| client_side.cc(3070) okToAccept: WARNING! Your cache is running out of filedescriptors
  2. [root@localhost ~]# squidclient mgr:info | grep 'file descri'
        Maximum number of file descriptors:   1024
        Available number of file descriptors:  178
        Reserved number of file descriptors:   100
  3. [root@localhost ~]# ulimit -a | grep 'open files'
    open files                      (-n) 1024
  4. Update system security limits (Each line describes a limit for a user in the form: <domain>  <type>  <item>  <value>) in /etc/security/limits.conf:
     * - nofile 4096
  5. [root@localhost ~]#  ulimit -a | grep 'open files'
    open files                      (-n) 4096
  6. Append `max_filedesc 4096` line to the vi /etc/squid/squid.conf
  7. service squid restart
  8. [root@localhost ~]# squidclient mgr:info | grep 'file descri'
        Maximum number of file descriptors:   4096
        Available number of file descriptors: 3842
        Reserved number of file descriptors:   100

No comments:

Post a Comment