Account Links: Cart | Your Account | Logout

Skip to content

Red Hat Knowledgebase

Red Hat Knowledgebase Search:

Updated Within the Last:

New Solutions within the last day New Solutions within the last week New Solutions within the last month

Browse by topics:


Click to View a Topic
Red Hat Enterprise Linux > Web Server > Issue <<  72 of 73 >>

Solution Tools:


Email a Solution Postcard Printer version Submit a comment on this answer Update notifications Request an answer Back

Article Reference

Article ID: 12915
Last update: 06-12-08
Issue:
How can I increase the maximum file descriptors for Squid?
Resolution:

If there are to many open files, or error messages such as WARNING! Your cache is running out of filedescriptors in cache.log, then Squid is running out of file descriptors and cannot handle the extra requests.

Some versions of squid have a compile-time limitation of 1024 maximum that cannot be increased by using ulimit at run-time.

A new configuruation option max_filedesc has been added to the following versions of Squid:

Red Hat Enterprise Linux 3: squid-2.5.STABLE3-6.3E.18
Red Hat Enterprise Linux 4: squid-2.5.STABLE14-1.4E
(This option is included in Squid for Red Hat Enterprise Linux 5 by default.)

Squid needs to be updated to the specified versions or above in order to use the new configuration option.

For example, to increase the maximum file descriptors to 4096, please do the following:

  1. In /etc/security/limits.conf , add this line:
    * - nofile 4096
  2. Save the file, logout and re-login to a shell. Use "ulimit" to check:

    # ulimit -a
    open files (-n) 4096
  3. Modify the /etc/squid/squid.conf and add this line:

    max_filedesc 4096

    (Notice: the value of max_filedesc should be the same as the value of nofile in /etc/security/limits.conf)

  4. Restart the squid service:

    # service squid restart
  5. Use "squidclient" to check:

    # squidclient mgr:info

    File descriptor usage for squid:
    Maximum number of file descriptors: 4096


How well did this entry answer your question?


good wrong incomplete out of date
Red Hat Enterprise Linux > Web Server > Issue <<   72  of  73  >>