Troubleshooting
Problem
Resolving The Problem
For example: an OutOfMemoryError will probably cause a system outage. On a production system this is not a desired event. Manually create a heapdump before the OutOfMemoryError generates one, then the Application Server can be recycled and result in a heapdump without an unscheduled outage.
The manually generated heapdump will not be as useful as one which was generated by an OutOfMemoryError, but sometimes it can be of some use. The longer you wait before generating the heapdump, the more likely the heapdump will contain the objects causing the OutOfMemory. If the heapdump is generated too soon, the largest memory user is not likely to be the same largest memory user as when the heap is completely full.
WebSphere Application Server V7 -> V9 |
Procedure
In the navigation pane, click Troubleshooting > Java dumps and cores.
Select the server or servers you need to collect a dump or core from.
Click System Dump or Java Core or Heap Dump depending on your need.
** Note: This is the preferred way to manually capture heapdumps because it doesn't require a restart, and doesn't require additional JVM arguments to be set.
In the Administrative Console:
- Servers > Server Types, WebSphere application servers > serverName:
- In the Server Infrastructure section open Java and Process Management, then select Process Definition:
- In the Additional Properties select Java™ Virtual Machine:
Add the following string to the Generic JVM arguments field:
- -Xdump:heap:events=user,request=exclusive+prepwalk+compact
** Note: The Application Server will need to be recycled for the setting to take effect.
To generate the heapdump, send the Application Server an interrupt. Use the "kill" command:
- kill -3 <java process ID>
Example: If the current process ID (pid) is 23456, then run the command: kill -3 23456
Was this topic helpful?
Document Information
Modified date:
09 January 2020
UID
swg21297060