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.
Goal of this tutorial
To explain how AppMon handles out of memory errors, and how to respond.
The easyTravel application is running and has run out of memory. AppMon capture these events by raising incidents.
- easyTravel demo application installation.
- AppMon with default easyTravel System Profile.
You need the Large Memory Leak easyTravel problem pattern. Run any scenario, then click Problem Patterns tab, and select Large Memory Leak. Let it go for some time, to allow AppMon to gather some data.
Detect the out of memory error
Every System Profile contains built-in incident rule Application Process Out-of-Memory. It triggers on out of memory error from the application. It also automatically creates a leak analysis memory snapshot, unless it's deactivated in the Agent Group - Agent Mapping Advanced Settings.
In the Total Memory dashlet, click Post-process.
You can also create custom incidents to trigger a memory snapshot, when memory consumption exceeds a certain threshold. See Memory diagnostics - Incident based to learn how.