如何在 Linux 服务器上设置 ulimit 和文件描述符数限制www.ffca2015.com2019-07-15
The challenge of encountering the number of open files in a production environment is now commonplace.
-- Shashidhar Soppin (author)
Introduction: The challenge of encountering the number of open files in a production environment is now commonplace. Because many applications are based on Java and Apache, installing and configuring them can result in opening too many files (file descriptors). If the file descriptor that is opened exceeds the limit of the default setting, you may face access control issues and be blocked from the challenge of opening the file. Many production environments have thus become stagnant.
Fortunately, on Linux-based servers, there is a ulimit command that allows you to view, set, and get the file open status and configuration details. This command comes with a number of options that allow you to set the number of open files. The following examples are explained in detail by examples.
To get the limit on the number of open files on a Linux server, execute the following command,