I have a complaint that a server application of mine is crashing on high load.
It is a web app running in Tomcat 5
.
I see the thread dumps and I see that th
According to this post:
There are two possible causes of the java.lang.OutOfMemoryError: Failed to create a thread message:
- There are too many threads running and the system has run out of internal resources to create new threads.
- The system has run out of native memory to use for the new thread. Threads require a native memory for internal JVM structures, a Java™ stack, and a native stack.
So this error may well be completely unrelated to memory, just that too many threads are created...
EDIT:
As you've got 695 threads, you would need 695 times the stack size as memory. Considering this post on thread limits, I suspect that you are trying to create too many threads for the available virtual memory space.