Because all linux systems are represented by files, it is necessary to modify the file handle limit during concurrent web systems. View the number of file handles used by a process # sudops-ef | grepjavaroot16631002: 37? 00:... information
Because all linux systems are represented by files, it is necessary to modify the file handle limit during concurrent web systems. View the number of file handles used by a process # sudo ps-ef | grep java root 1663 1 0? 00:00:43/opt/bitnami/java/bin/java the pid of the process can be learned from the result, then check the number of file handles currently used by the process according to the pid # sudo ls/proc/1663/fd | wc-l 1022 found that the number of handles remains at 1022, at the same time, the top view found that the load continued to increase. So I checked the number of handles of the current process. # Sudo cat/proc/1663/limits | grep "files" Max open files 1024 1024 files found that the limit is stuck here, so modify/etc/sysctl. conf file, add a line as follows: fs. file-max = 30720 save. Run # sudo sysctl-p and check it again. Google found that there are two file handle restrictions in linux systems: system-level and user-level. Modify system-level: www.2cto.com # echo "30720">/proc/sys/fs/file-max to modify user-level: # sudo vi/etc/security/limits. * soft nofile 2048 * hard nofile 32768 indicates any user, and soft/hard indicates soft and hard limits. Modify/etc/pam. d/login files specify the PAM session required/lib/security/pam_limits.so, but note whether the system is 32-bit or 64-bit, if it is 64-bit, it is the modification above/lib64/security/pam_limits.so, reboot, check again # ulimit-n 30720 is modified successfully.
Author berdy
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