Increase the maximum number of opened files/file descriptors in Linux
Source: Internet
Author: User
Increase the maximum number of opened files/file descriptors in Linux. 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-max65535www.2cto.com2, view the maximum number of files opened by the current user # ulimit-Hn... 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
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