MustGather: Out of Memory errors on Solaris - Heap Leak
 Technote (troubleshooting)
 
Problem(Abstract)
Collecting data for Out of Memory errors with IBM® WebSphere® Application Server on the Solaris platform. Gathering this information before calling IBM Support will help familiarize you with the troubleshooting process and save you time.
 
Cause
An Out of Memory error is generally indicated when a java.lang.OutofMemoryError exception is thrown. Two conditions can cause a java.lang.OutOfMemoryError exception to occur:
  1. The Java™ Virtual Machine (JVM) might run out of Java heap space to allocate a Java object.

  2. The JVM might not be able to allocate native memory.
 
Resolving the problem

Out of Memory (heap leak) specific MustGather information
Debugging the Java virtual machine (JVM) that is running out of Java heap.

If you suspect a memory leak in the Java™ heap, the first step is to eliminate any misconfiguration or tuning as a potential cause:

  1. Increase the Maximum Java Heap Value (-Xmx) and test again.
  2. Follow instructions for Enabling verbosegc in WebSphere Application Server
  3. Ensure that the heap generations (NEW and PERM) are sized appropriately. Default values for MaxPermSize (Permanent Region) are often insufficient for applications. The Permanent Region holds class data and other very long lived resources. MaxPermSize (default 64MB) should be set to a quarter of max heap.

    For example:

    -XX:MaxPermSize=128m

    MaxNewSize, the Young generation is intended for short-lived objects where Java objects are created and age, from where they are collected without a Full garbage collection (GC) cycle. Young Generation (default 32MB) of the heap should be set to a quarter of max heap size.

    For example:

    -XX:MaxNewSize=128m

    For information on setting these properties, please see the Generic JVM Arguments section of the following document:

  4. Run in HotSpot Server mode (-server). Running in HotSpot client mode halves the size of the Permanent Region and therefore increases the stress on this part of the heap in the Sun® JVM.

    For more details read, Setting up a HotSpot server or client mode on a Java 2 SDK.

  5. Disable System GCs. Another way applications can interact with garbage collection (GC) is by invoking GCs explicitly, such as through the System.gc call. These calls force major collection, and inhibit scalability on large systems. 

    -XX:+DisableExplicitGC

  6. Switch to the Alternate Threading Library. The Solaris 8 operating environment supports an alternate version of libthread that binds threads to LWPs directly; this might help avoid starvation of the finalization thread.  To try this, set the environment variable LD_LIBRARY_PATH to include /usr/lib/lwp before launching the JVM.

    For more details refer to: Changing to the alternate, one-to-one threading library on Solaris 8 improves performance.
  7. Stop the WebSphere application Server and recycle the logs
  8. Restart the application server.

  9. Run the application until java.lang.OutOfMemory exceptions occur.

If making configuration changes does not resolve the problem and a Java heap leak is still present, Please collect Heapdumps, following instructions in Getting Heapdumps on Solaris platform

Note : Heapdumps can be analyzed using the IBM-developed HeapAnalyzer tool.
  1. Collect the following information:
For WebSphere V6.0 and V6.:
  • All files in the following directory:

    install_root/profiles/profile_name/logs/server_name

  • A copy of server.xml located in the following directory:

    install_root/profiles/profile_name/config/cells/
    cell_name
    /nodes/node_name/servers/server_name


For WebSphere V5.0 and V5.1:
  • Include all of the files from the following directory:

    install_root/logs/server_name

  • A copy of server.xml located in the following directory:

    install_root/config/cells/cell_name/nodes/
    node_name
    /servers/server_name



Follow instructions for Submitting Diagnostic Information to IBM Technical Support for Problem Determination.

For a listing of all technotes, downloads, and educational materials specific to the Out of Memory component, search the WebSphere Application Server support site.

 
Related information
Java HotSpot VM Options
Tuning Garbage Collection with the 1.3.1 Java Virtual M
MustGather: Out of Memory errors on Solaris - Native Le
 
 
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): Solaris
Software version: 6.1
Software edition:
Reference #: 1145349
IBM Group: Software Group
Modified date: Mar 10, 2007