Am trying to spawn a new thread for every client that is connecting to my application. At present am not able to spawn more than 1085 threads, beyond which am getting the below exception. I am using HP UX 11.31 64 bit machine
Exception in thread "main" java.lang.OutOfMemoryError: unable to create new native thread
at java.lang.Thread.start0(Native Method)
Would greatly appreciate any insights to overcome this problem.
yes, apart from increasing the -Xmx i've tried giving a lower value for it as well to make more memory available for native kernel.
i just said clients to indicate that its not a bad design and i cannot do away with the thousand threads running. I use TCP and hence i manage the socket output stream in a thread for each client connection. So nothing to do with RMI here.
The issue is more related to the HP UX 11.3 machine, as the same program runs fine in other OS such as AIX.
Joined: Nov 02, 2009
the problem got resolved soon after running the program in 64 bit mode.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com