java.lang.OutOfMemoryError: unable to create new native thread
843811Mar 11 2005 — edited Jun 21 2005I'm using the following command line to start my java application:
java -Xms128M -Xmx128M -jar Server.jar
But after the program runs for a while (14 hours or so) I get this error:
java.lang.OutOfMemoryError: unable to create new native thread
I should mention this program is a server that uses NIO sockets. The error is occuring when trying to spawn a new thread to handle the work for an incoming request. Does database updates, writes files, etc.
The strange this is, when I check the process ID it is only allocated 45MB of RAM. So the JVM is not using all the memory I have told it to with the -Xms -Xmx parameters.