Memory leak in Invocation Cache causing OutOfMemory after applying Cumulative Fix 5.1.1.6, 5.0.2.12, 5.0.2.13 or 5.0.2.14
 Flash (Alert)
 
Abstract
A memory leak occurs after upgrading to IBM® WebSphere® Application Server Versions 5.1.1.6, 5.0.2.12, 5.0.2.13 or 5.0.2.14.
 
Content
After upgrading to WebSphere Application Server Cumulative Fix Version 5.1.1.6, 5.0.2.12, 5.0.2.13, or 5.0.2.14, a memory leak occurs in the Invocation Cache, which leads to an OutOfMemory situation.

From the heapdump analysis it has been found that the total number of com/ibm/ws/webcontainer/srt/WebAppInvoker live objects is more than expected. The expected maximum number of these objects can be calculated as follows:

If, P = Thread pool Size and C = invocation cache size

Then, the maximum number of cached WebAppInvoker objects should be as follows:
(2 * P + 1) * C

The heapdump generated due to this problem might have the following behavior:

218,583,808 [128] 23 com/ibm/ws/webcontainer/srt/WebGroup 0x12ee8c30
 218,582,888 [16] 1 com/ibm/ws/webcontainer/srt/CachedTargets 0x12e4f93
  218,582,872 [32] 1 java/util/Vector 0x12e65fd0
   218,582,840 [40,976] 9,719 array of java/lang/Object 0x149fd0d8
     227,968 [56] 8 com/ibm/ws/webcontainer/srt/WebAppInvoker0x1ec711e0
     165,688 [56] 8 com/ibm/ws/webcontainer/srt/WebAppInvoker 0x1f86615
     140,904 [56] 8 com/ibm/ws/webcontainer/srt/WebAppInvoker 0x1ff5c45
     There are 9,699 more children

The preceding example heapdump has 9,719 of com/ibm/ws/webcontainer/srt/WebAppInvoker objects. The expected maximum number of these objects can be calculated to be (2 * 50 + 1) * 50 = 5050.

Solution to this problem:
To resolve this problem on WebSphere Application Server Versions 5.0.2.12, 5.0.2.13, 5.0.14 and 5.1.1.6, apply the interim fix for PK15035:
This problem has already been fixed in Version 5.1.1.7 (and above) and Version 5.0.2.15 (and above) by inclusion of PK12027.


Temporary work around 1:
Setting the invocation cache size to zero will disable invocation cache functionality and there will be no more caching of WebAppInvoker objects. To set the invocation cache to zero, folllow these steps:

  1. In the administrative console, click the Application Server.
  2. Click Process Definition under Additional Properties.
  3. Click the Java™ Virtual Machine under Additional Properties.
  4. Add the following argument in the Generic JVM™ arguments:

    -DinvocationCacheSize=0

  5. Click Apply to ensure that the changes are saved.
  6. Stop and restart the Application Server.

Temporary work around 2:
If the invocation cache size cannot be set to zero, this issue can be avoided by setting the minimum thread pool size to the same value as the maximum thread pool size and setting growable to false. To make these changes, follow these steps:
  1. In the administrative console, click the Application Server.
  2. Click Web Container under Additional Properties.
  3. Click Thread pool under Additional Properties.
  4. Change Minimum size to be the same as Maximum size.
  5. Uncheck Is Growable.
  6. Click Apply to ensure that the changes are saved.
  7. Stop and restart the Application Server.
 
 
Cross Reference information
Segment Product Component Platform Version Edition
Application Servers Runtimes for Java Technology Java SDK
 
 


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server > Out of Memory
Operating system(s): Windows
Software version: 5.1.1.6
Software edition:
Reference #: 1217473
IBM Group: Software Group
Modified date: Jun 9, 2006