How do common users increase the maximum number of files?

Source: Internet
Author: User


How can a common user increase the maximum number of files to run a program on the server yesterday? The error "java.net. socketException: Too program open files ". You can use ulimit-a to check that the value of open files is 1024. You just want to increase the value and run ulimit-n 4096, the result shows that "ulimit: open files: cannot modify limit: The operation is not allowed." It is not a change, but a common user can only change the size, but cannot change the size ..... you can change the root user as needed, but the root user can only change the root user. Then I searched the internet and found that www.2cto.com could be modified by modifying/etc/security/limits. to solve this problem, add two configurations in the conf file. the Java code * soft nofile 65535 * hard nofile 65535 requires the root user to have the permission to modify the file. After the change, the user logs on again, and then ulimit-a checks that the number of open files is 65535.
Author swordinhand

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.