I have a Java application that is hosted on by a web hosting company. Every few days my app goes down with:
[2011-03-09 15:52:14,501] ERROR http-12021-9
java.lang.OutOfMemoryError: unable to create new native thread
at java.lang.Thread.start0(Native Method)
at java.lang.Thread.start(Thread.java:597)
The hosting company says it means my app is leaking memory, but the tools I have are showing free memory is still available. Since the error is always creating a new native thread my thinking is that the issue is in the JVM config/OS resources.
How do I prevent this error from happening?
解决方案
Its most likely the problem with JVM at web-server end. Please check out the following link for some details,