Solve the filedescriptors problem of squid in Linux
Source: Internet
Author: User
Solve the filedescriptors problem of squid in Linux-Linux general technology-Linux programming and kernel information. The following is a detailed description. Squid log files often report errors today:
WARNING! Your cache is running out of filedescriptors
According to the information on the Internet, filedescriptors is the file descriptor.
A file descriptor is a simple integer used to indicate the files and sockets opened by each process. The first open file is 0, the second is 1, and so on. A Unix operating system usually imposes a limit on the number of files that can be opened by each process. What's more, unix usually has a system-level limit.
Because of squid's working method, file descriptor restrictions may greatly affect performance. After squid runs out of all file descriptors, it cannot receive new connections from users. That is to say, a denial of service is caused by the use of file descriptors. After a part of the current request is completed, the corresponding file and socket are closed, and squid cannot receive new requests. When squid detects a file descriptor shortage, it will issue a warning.
Before running./configure, check whether the file descriptor restrictions of your system are appropriate to avoid some trouble. In most cases, 1024 file descriptors are sufficient. A very busy cache may require 4096 or more. When setting the file descriptor limit, we recommend that you set the system-level limit to twice the limit for each process.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service