How to modify the maximum number of files opened by the system in centos

Source: Internet
Author: User

In Linux, when too many files are opened by running processes and the limit of the maximum number of files opened by the system is exceeded, the too program open files error occurs, don't be nervous. You just need to modify the system configuration. The procedure is as follows:

1. Open the configuration file:

Vim/etc/security/limits. conf

2. Add two lines at the end of the file:

# * Soft Core 0 # * hard RSS 10000 # @ student hard nproc 20 # @ faculty soft nproc 20 # @ faculty hard nproc 50 # ftp hard nproc 0 # @ student-maxlogins 4 * -nproc 102400 *-nofile 102400

The last "102400" is the limit value for modifying the maximum number of opened files. You need to fill it out. However, if it is set to "102400", in many cases, the too program open files error will no longer occur. This can be regarded as one of the system optimizations after the system is installed.

Related Article

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.