How to resolve java.lang.OutOfMemoryError: unable to create new native thread


This error occurs when the operating system is unable to create new threads. This is due to the JVM Heap taking up the available RAM.
Big heaps take away from the space that can be allocated for the stack of a new thread

The size of the stack per thread contributes to this problem. The stack size can reduce the number of threads that can be created.

To fix this problem, you should the size of the stack per thread.The stack size can be changed with the following (example) parameter as VM argument while running java application:
"-Xss128k"

No comments:

Post a Comment