Analyzing out of memory errors

What is an out of memory error?

Out of Memory errors in Java and .NET occur when the VM/CLR cannot create a requested object because it cannot allocate any more memory. This can happen for several reasons:

  • Memory Leak.
  • Insufficient memory configuration for the JVM.
  • Single transactions need too much memory so parallel running transactions do not have enough.

See Out Of Memory Error for more information.

Goal of this tutorial

To explain how AppMon communicates out of memory errors, and how to respond.

Scenario

The easyTravel application is running and has run out of memory. To induce a memory leak in easyTravel, locate the Running Out of Memory scenario in the Test Center.

Requirements

  • Standard Demo Applications - easyTravel installation.
  • AppMon installation with default easyTravel System Profile.
  • The easyTravel Memory Leak activated, for example using the Running out of Memory Scenario.

Detailed steps

Detect the out of memory error

After the memory leak in easyTravel has exhausted the memory, AppMon raises a new incident. This displays in the lower right corner of the application.

For Java 6 and later, AppMon automatically captures a leak analysis memory snapshot. Use this to analyze the problem. To create a leak analysis memory snapshot in earlier Java releases, set up an incident that triggers when the memory usage reaches very high levels such as 95%.

To open the Incident dashlet, click on the AppMon Server name in the lower right corner of the AppMon Client to get a list of incidents.

Right-click the Out Of Memory incident and open the memory snapshot.

Conclusion

AppMon detects out-of-memory errors and captures a leak analysis snapshot for further diagnosis.