IBM Version 52 Computer Accessories User Manual


 
less memory will be freed. If this trend continues, the Garbage Collector will not
be able to free enough objects to allocate new objects. When this happens, the heap
will be near 100% utilized and the JVM will fail with an OutOfMemoryError
exception.
Increasing the size of the Java heap may resolve an OutOfMemoryError exception.
However, if the exception is due to a memory leak, increasing the heap size will
not resolve this issue. In this case, further troubleshooting, including analyzing the
contents of the heap using heap dump analysis or a tool such as JProbe
®
or
OptimizeIt
is necessary. Refer to the IBM 6.0: Java Diagnostics Guide for more
information about heap dump analysis.
The Application Hangs
The application hangs when either a deadlock occurs or a loop is encountered. A
potential deadlock scenario is one in which multiple threads in the JVM are
blocked and are waiting on the same object resource. Another situation that may
result in a deadlock is when there is a missed notification between threads because
of a timing error. Similarly, a loop may be encountered if there is a missed flag,
which in turn may terminate the loop. A loop can also be encountered if the wrong
limit has been set for the loop iterator. In either of these cases, the thread will fail
to exit in a timely manner.
The recommended approach is to trigger a thread dump and interpret it. The
thread dump provides all the information pertaining to the object resources in the
JVM. A thread dump can be triggered to take a snapshot of all the information
related to the JVM and a Java application at a particular point during execution.
The information that is captured includes the OS level, hardware architecture,
threads, stacks, locks, monitors, and memory.
By default, thread dumps are enabled. A thread dump is triggered when the JVM
is terminated unexpectedly, an OutOfMemoryError is encountered, or when a user
sends specific signals to the JVM. Sterling B2B Integrator also enables users to
trigger a thread dump through the Sterling B2B Integrator UI.
Trigger Thread Dump
To trigger a thread dump for the ASI JVM:
1. From the Administration menu, select Operations > System > Performance >
JVM monitor.
2. In the JVM MONITOR page, under Thread Dump, next to Take Thread
Dump, click Go!.
The Thread Dump Taken page is displayed. It may take some time to generate
the thread dump. During this time you may not be able to access other pages.
If heap dumps are enabled, the delay will be longer before the process is
completed.
3. Click Go! in the Thread Dump pop-up window to have the thread dumps
populated on the JVM MONITOR page.
4. Close the Thread Dump Taken pop-up window.
5. To view the dump, in the JVM MONITOR page, under View Dumps, select the
dump file, and click Go!.
6. In the Dumps download pop-up window, click the Download link to
download the file to the local machine.
80 Sterling B2B Integrator: Performance Management