Increase the maximum number of opened files/file descriptors in Linux

Source: Internet
Author: User

Increase the maximum number of opened files in Linux/file descriptor 1. view the maximum number of opened files
1. view the system and the maximum number of opened files [root @ localhost ~] # Cat/proc/sys/fs/file-max65535 www.2cto.com 2. view the maximum number of files opened by the current user # ulimit-Hn // view hard limits # ulimit-Sn // view Soft Limits
Ii. Set the maximum number of opened files
1. System and settings # vi/etc/sysctl. added conf: fs. file-max = 100000 takes effect immediately: # sysctl-p2, user-level settings vi/etc/security/limits. the conf settings are as follows: www.2cto.com httpd soft nofile 4096 httpd hard nofile 10240httpd is a user. Wildcards * can be used to represent all users. To make the limits. conf file take effect, make sure that the pam_limits.so file is added to the Startup File. View/etc/pam. in the d/login file, session required/lib/security/pam_limits.so takes effect immediately using the following command: # su-httpd $ ulimit-Hn 10240 $ ulimit-Sn 4096 author Zhu MahaI

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.