-
1. Re: JBWEB000236: Servlet.service() for servlet sample threw exception: java.lang.OutOfMemoryError: unable to create new native thread
jaysensharma Feb 18, 2016 1:56 AM (in response to shijazi)Try reducing the "Heap size a bit" (So that you will have little more space for your jvms native area for the thread creation.
OR
Try reducing the Thread Stack Size (-Xss) that is default to 1024k
Following blog might give some directions:
OutOfMemory Causes and First Aid Steps?
http://middlewaremagic.com/weblogic/?p=4464
Regarding your query: "we increased memory and received OutOfMemoryError, It's strange"
>>> NOTE: You are not getting "OutOfMemory in Heap" Rather it is "Native OutOfMemory" so increasing the Heap will cause this issue to become more severe. Because that will cause more little space to be available for the Native Area of the JVM.
Regards
Jay SenSharma
-
2. Re: JBWEB000236: Servlet.service() for servlet sample threw exception: java.lang.OutOfMemoryError: unable to create new native thread
mnovak Feb 18, 2016 5:42 AM (in response to jaysensharma)"...unable to create new native thread" indicates that OS exhausted limit for processes.
Can you check ulimits for your system? If you're on linux like machine you need to increase value for "max user processes" and also "open files".
Cheers,
Mirek
-
3. Re: JBWEB000236: Servlet.service() for servlet sample threw exception: java.lang.OutOfMemoryError: unable to create new native thread
shijazi Feb 18, 2016 5:44 AM (in response to mnovak)I have same installation for both JBOSS servers, but problem happened in one server only
-
4. Re: JBWEB000236: Servlet.service() for servlet sample threw exception: java.lang.OutOfMemoryError: unable to create new native thread
jaysensharma Feb 18, 2016 5:54 AM (in response to shijazi)Yes, problem happened only on one instance because looks like you have set 4303m for Heap and 1024m for PermGen size but that will cause little less space to be available for the Native area. So either try any of the following suggestion to see what happens:
1. Try reducing the "Heap size a bit like -Xmx2048m " (So that you will have little more space for your jvms native area for the thread creation.
OR
2. Try reducing the Thread Stack Size (-Xss) that is default to 1024k (like -Xss512k )
-
5. Re: JBWEB000236: Servlet.service() for servlet sample threw exception: java.lang.OutOfMemoryError: unable to create new native thread
mnovak Feb 18, 2016 6:04 AM (in response to jaysensharma)"...unable to create new native thread" is a thread leak. It's common problem with ulimits on linux like machines. Just try to set "max user processes" and also "open files" to higher values. Linux machines set this value too low.
If you see OOME after this change then use visualvm to see which threads exhausted the system.
-
6. Re: JBWEB000236: Servlet.service() for servlet sample threw exception: java.lang.OutOfMemoryError: unable to create new native thread
shijazi Feb 18, 2016 6:37 AM (in response to jaysensharma)I changed the Xss to be 128K, and now i am testing to see the results
-
7. Re: JBWEB000236: Servlet.service() for servlet sample threw exception: java.lang.OutOfMemoryError: unable to create new native thread
shijazi Feb 18, 2016 6:38 AM (in response to mnovak)How can I see OOME?
-
8. Re: JBWEB000236: Servlet.service() for servlet sample threw exception: java.lang.OutOfMemoryError: unable to create new native thread
mnovak Feb 18, 2016 7:03 AM (in response to shijazi)OOME = OutOfMemoryError
It's just if you can seee OOME afte adjusting ulimits.