About the "java.lang.OutOfMemoryError:unable to create new native Thread" error problem

Source: Internet
Author: User

Transferred from: https://www.cnblogs.com/flying-tiger/p/5956926.html

Java.lang.OutOfMemoryError:unable to create new native Thread.

Specific as follows:

When viewing the log file, the following error message is also available:

Error occurred during initialization of VMS ...

After Baidu, find the method:

Since the newspaper is "OutOfMemoryError"and " unable to create new native thread.", it is likely that the number of thread that the program requested exceeds the limit that the system can host. But as a good performance of the server, there is no reason why the system resources are not enough AH?

Okay, so let's use the Ulimit command to see the system's control over the process resources:

ulimit -a  

The output is as follows:

Does it seem that max user processes is running out of numbers?
Or, use the Ulimit command to zoom in on the max user processes One more try:

ulimit -u 2048  (使用postgres用户运行该命令)

Get:

(It is worth saying here, because I just want to temporarily change the current shell settings, if you want to permanently set to modify the/etc/security/limits.conf file, please Baidu).

When you're done modifying it, run it again:

About the "java.lang.OutOfMemoryError:unable to create new native Thread" error problem

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.