|
| Problem | This document describes how to troubleshoot java.lang.OutOfMemoryError errors on a Windows® platform when you suspect a memory leak in the Java™ heap based on your analysis of the documentation collected from the technote "MustGather: Out of Memory Errors on Windows, Part 1" | | | | Solution | You must first read MustGather: Out of Memory Errors on Windows, Part 1.
Out of memory, Java heap specific MustGather information
Set up for enabling heap dump:
- For V6.0 release:
- To set the following Environment Entries from the administrative console:
Select Servers > Application Servers >server_name> Java and Process Management > Process Definition > Environment Entries > New
- Add the following Name/Value pairs:
IBM_HEAPDUMP true
IBM_HEAP_DUMP true
IBM_HEAPDUMPDIR your_directory IBM_HEAPDUMP_OUTOFMEMORY true
IBM_JAVADUMP_OUTOFMEMORY true
- Make sure that you save changes to the master configuration
- For V5.0 and V5.1 releases:
- To set the following Environment Entries from the administrative console:
Select Servers > Application Servers >server_name> Process Definition > Environment Entries > New
- Add the following Name/Value pairs:
IBM_HEAPDUMP true
IBM_HEAP_DUMP true
IBM_HEAPDUMPDIR your_directory IBM_HEAPDUMP_OUTOFMEMORY true
IBM_JAVADUMP_OUTOFMEMORY true
- Make sure that you save changes to the master configuration
- For V4.0 release:
- To enable the heap dump, add the following lines to the top of the adminserver.bat file in the install_root/bin directory, after the call to setupCmdLine.bat:
call "%~dp0setupCmdLine.bat"
set IBM_HEAPDUMP=true
set IBM_HEAP_DUMP=true
set IBM_HEAPDUMP_OUTOFMEMORY=true
set IBM_JAVADUMP_OUTOFMEMORY=true
set IBM_HEAPDUMPDIR=directory_path
- When you start the administrative server, use the modified adminserver.bat file from a command prompt instead of using the Services panel.
- For V3.5 release:
- To enable the heap dump, add the following lines to the adminserver.bat file in the install_root/bin/debug directory, after the call to setupCmdLine.bat:
call "%~dp0setupCmdLine.bat"
set IBM_HEAPDUMP=true
set IBM_HEAP_DUMP=true
set IBM_HEAPDUMP_OUTOFMEMORY=true
set IBM_JAVADUMP_OUTOFMEMORY=true
set IBM_HEAPDUMPDIR=directory_path
- When you start the administration server, use the modified adminserver.bat file from a command prompt instead of using the Services panel.
- Notes:
- The heap dump is written to the current directory, install_root/bin, or the directory specified by the IBM_HEAPDUMPDIR environment variable.
- The file that is generated is called heapdumppid.timein internal format txt. This file can be very large; allow for at least the maximum heap size. If the maximum heap is set to 512 MB, allow for .5 GB for the dump.
When failure occurs:- This mechanism uses the same signal handler as javacore processing, so do not have DISABLE_JAVADUMP set as an environment variable.
- Follow instructions on How to enable verbosegc in WebSphere Application Server
- Delete all Application Server and FFDC log files, if possible. Back up them, if needed.
- Restart the Application Server
- Wait for the OutOfMemoryError condition to occur. This should cause the generation of a heapdump
- If you want to analyze the heapdump yourself, follow instructions to use IBM HeapAnalyzer toolfor analyzing JVM heap usage. If you do not want to analyze this yourself, proceed to step 8.
- Collect the following files:
- For WebSphere Application Server V6.0 releases
- The server.xml file located in the <install_root>\profiles\<ProfileName>\config\cells\<CellName>\nodes\<NodeName>\servers\<ServerName>
- Everything in the <install_root>\profiles\<ProfileName>\logs\<ServerName> directory, specifically systemErr, systemOut, native_stderr and native_stdout logs
- Everything in the <install_root>\profiles\<ProfileName>\logs\ffdc directory
- For WebSphere Application Server V5.0 and V5.1 releases:
- The server.xml file located in the install_root\config\cells\nodes\node_name\servers\server_name directory, specifically systemErr, systemOut, native_stderr and native_stdout logs are needed
- Everything from the install_root\logs\<ServerName> directory
- Everything from the <install_root>\logs\ffdc directory
- For WebSphere Application Server V4.0 and 3.5 releases:
- A XMLConfig full export.
- Everything from the install_root\logs directory from the WebSphere Application Server system, specifically stderr and stdout and tracefile files
- All documents requested For all releases below
- For all releases
- All javacore*.txt files that were created when OutOfMemory conditions occurred. If javacore*.txt files were created, you can find them in the install_root, install_root\bin or in the configured working directory
- Include the Application Server systemErr, systemOut, native_stderr, and native_stdout logs, if they are located in a different directory
- List of all other software and version information on the system. For example, any databases, WebSphere MQ®, and so forth.
- Follow instructions to send diagnostic information to IBM support.
Notes:- JVM heap dump generation on OutOfMemory are enabled by default startng from IBM JDK 1.3.1 SR5 and in all of the IBM JDK 1.4.X releases. However, IBM recommends that you enable JVM HeapDumps settings for all IBM JDK releases so that you can control where JVM heap dump is written.
| |
| | | |
| |
|
Product categories: Software, Application Servers, Distributed Application & Web Servers, WebSphere Application Server, Out of Memory Operating system(s): Windows Software version: 3.5, 4.0, 5.0, 5.1, 6.0 Software edition: Advanced, Base, Express, Network Deployment, Single Server, Standard Reference #: 1140641 IBM Group: Software Group Modified date: 2004-12-15
(C) Copyright IBM Corporation 2000, 2004. All Rights Reserved.
|