Results 1 to 1 of 1
- 11-16-2007, 02:47 PM #1Member
- Join Date
- Nov 2007
- Rep Power
OutOfMemoryError: Unable to Start New Native Thread
i am running Java 1.4.2_08-b03 on Sun Solaris SunOS 5.9.
In my application i spawn off many short lived threads. (Now, the design of this is out of my hands, it is a multi-user system, and we make use of LDAP connections, so whenever a new connection is obtained, the Sun LDAP implementation would spawn a new short lived thread.)
i understand that typically the above error ("OutOfMemoryError: Unable to Start New Native Thread") occurs when there is insufficient memory in the NATIVE heap rather than the Java heap (controlled by Xms and Xmx), and also, the bigger the Java heap (set with Xms and Xmx), the smaller the native heap and the more likely to run into the error.
However, what i am facing is that i'm running into the error when i tweak some other GC settings (i.e. Xms and Xmx remain constant).
-Xms2048m -Xmx2048m -XX:MaxPermSize=256m
-Xms2048m -Xmx2048m -XX:MaxPermSize=256m -XX:+UseConcMarkSweepGC -XX:+UseParNewGCJava Code:
-Xms2048m -Xmx2048m -XX:NewSize=310m -XX:MaxNewSize=310m -XX:MaxPermSize=256m
The reason why i need to try (2) and (3), is that with (1), with the default new size, after sometime, the remaining space in tenured is unable to fulfil the young generation guarantee, and it ends up doing a major collection every time.
Any suggestions please? i urgently need help here.
Thanks in advance,
- By markyoung1984 in forum Threads and SynchronizationReplies: 4Last Post: 10-03-2008, 06:32 PM
- By uppaluru in forum Other IDEsReplies: 1Last Post: 02-13-2008, 08:51 AM
- By skaterxu in forum Advanced JavaReplies: 0Last Post: 01-28-2008, 08:02 AM
- By javaplus in forum New To JavaReplies: 2Last Post: 11-11-2007, 08:44 PM