The maximum number of opened files configured in Linux
Source: Internet
Author: User
Background: After the project is launched, it is found that the Telnet module is automatically disconnected after a period of stable operation and cannot be logged on. The exception java.net. SocketException: Toomanyopenfiles is thrown in the background. There are two reasons for this: 1. the opened Socket is not properly closed, which may be from...
Background: After the project is launched, it is found that the Telnet module is automatically disconnected after a period of stable operation and cannot be logged on. The background throws the exception "java.net. SocketException: Too program open files. There are two reasons for this: 1. the opened Socket is not properly closed. This may be due to a problem with the automatic timeout function or other reasons. 2. the maximum number of files opened in Linux by default is too small (default value: 1024, use: ulimit-n command to view ). The first reason is that it takes time to troubleshoot. modify the Linux configuration so that the project remains stable for the time being. Configure the maximum number of Linux files opened at www.2cto.com: Java code/etc/security/limits. conf: add the file to the end. maximum number of opened files: * soft nofile 65535 * hard nofile 65535/etc/pam. d/login: add session required/lib/security/pam_limits.so to the end of the file and run the command to check whether ulimit-n is consistent with the setting by brofe.
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