Linux: limits the number of files opened by modifying processes

Source: Internet
Author: User
There are several methods for linux to modify the number of files opened by processes, but the effects are different. 1. modify/etc/security/limits. conf and add the following two lines * softnofile65536 * hardnofile65536. this method only applies to the current configuration and becomes invalid after the system is restarted .... There are several methods for linux to modify the number of files opened by processes, but the effects are different. 1. modify/etc/security/limits. conf and add the following two lines: * soft nofile 65536 * hard nofile 65536. this method only applies to the current configuration. after the system is restarted, it becomes invalid. 2. add ulimit-SHn 65536 to/etc/rc. local to ensure that the system will still take effect. Note: The direct ulimit-SHn 65536 will only be produced for the current user in the current session. if you exit the current logon user, it will become invalid, so it is generally useless: view the maximum number of files that can be opened by the current process: cat/proc/process ID/limits view the number of files opened by the current process in real time lsof-p PID | wc-l

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.