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