Skip to Main Content

Java HotSpot Virtual Machine

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

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

843811Mar 11 2005 — edited Jun 21 2005
I'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.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 19 2005
Added on Mar 11 2005
10 comments
826 views