System concurrency Report too much open files error

Source: Internet
Author: User

In concurrent systems, there are often exceptions to the open too much files. Even the system is down. In this case, there are two reasons for the temporary discovery. The first is that the Java program is not written well, Some resources have been opened without closing in time. The second is the Linux system above the configuration. The default number of open files on Linux is 1024. Use command Ulimit- N View. The general 1024 configuration is not suitable for concurrent systems. It should be bigger. At the same time, if you use Nginx to do reverse proxy and load balancing. It is also best to set the number of open files. The next is our Java program. This is what we are concerned about. First on the Linux system to find the PID of the Java system I used to use the command for PS aux|grep Java first row of the second column that number is the Java system PID. Then use Lsof-p [Java system pid]|wc-l To see how many files the Java system opens. If there is no problem with the Java program. The number shown will stabilize to a certain extent. If it is true that the Java program is not written well. That number will always go up. Cause the system to collapse

System concurrency Report too much open files error

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.