anonymous wrote : OutOfMemory: unable to create new native thread. This error is actually not necessarily related to lack of memory. It basically means that the JVM could not create a new thread of execution as requested.
I have only ever seen it in relation to the Linux kernel 2.4's (and earlier) use of lightweight processes instead of true "threads". 2.4 has a hard-coded limit of 1024 processes that a process can spawn/create. So, because a thread is a process in 2.4 (and earlier), you can only create 1024 in your Java program. This limitation is not just a Java limitation however. I have read that you can recompile the kernel to increase this hardcoded limitation, but I have not done that. For Kernel 2.6+, the use of the NPTL (Native Posix Thread Library) which allows for more "true" thread behavior, will allow you to overcome this limitation (so I have read). You can monitor the number of threads used by your process by using the JMX console in conjunction with the ServerInfo MBean's listThreadDump method. See if you start seeing this exception if your thread count gets up above 1000. If so, then this kernel limitation is the likely source of this particluar exception. In applications where I had this problem, I limited various thread pools so that I never reached the process-wide 1024 thread limit, and that seemed to work well. I am not sure how to address you other problems, but I hope this information helps. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3868018#3868018 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3868018 ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ JBoss-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jboss-user
