IBM FileNet P8, Version 5.2.1            

Preventing IBM Java Virtual Machine (JVM) out-of-memory errors

Under certain conditions, an application server can throw out-of-memory errors when the heap still had ample memory available.

For example:
E_UNEXPECTED_EXCEPTION: An unexpected exception was detected. 
Caused by: java.lang.OutOfMemory
Error: JVMCI015:OutOfMemoryError, 
cannot create more threads due to memory or resource constraints.

Situations similar this example can occur when the memory inside the heap becomes fragmented or is otherwise poorly allocated.

One way to avoid similar situations is to increase the minimum heap size to 50% of the maximum heap size assuring sufficient memory is allocated when the JVM is started. Another option is to ensure that an adequate amount of memory is set aside in the heap to load the JVM code. This area of memory can be called the class cache. The amount of memory for the class cache is controlled by the Xinitsh JVM parameter, which sets the initial system size of the heap.

For JVMs that run on 32- bit operating systems, consider a value of 4 MB. JVMs that run on 64- bit operating systems are set to 8 MB by default, which is typically large enough to avoid this problem. To use this option, add the following switch to the application server command-line arguments:

-Xinitshsize



Last updated: March 2016
p8ppt167.htm

© Copyright IBM Corporation 2016.