• Home
  • Deploy
  • Technology support
  • Runtimes
  • Java
  • Out-of-memory (OOM) and out-of-threads (OOT) events and alerting

Out-of-memory (OOM) and out-of-threads (OOT) events and alerting

To set up out-of-memory (OOM) and out-of-threads (OOT) events for standalone/PaaS scenarios and cloud-native Full-Stack injections, follow the instructions below.

Enable the OneAgent feature

Create metric events

Enable the OneAgent feature

To enable out-of-memory (OOM) and out-of-threads (OOT) detection

  1. In the Dynatrace menu, go to Settings and select Preferences > OneAgent features.
  2. Find and turn on Enable Out-Of-Memory and Out-Of-Thread Detection for Kubernetes and PaaS installations.
  3. Select Save changes.

Create metric events

After you enable detection, create two metric events that will alert on high GC activity.

  1. In the Dynatrace menu, go to Settings and select Anomaly detection > Metric events.

  2. Select Add metric event.

  3. Define the following two events.
    We recommend setting alerts for long garbage collection times if either more than 40% of a minute (24 s) is spent in garbage collection or suspension is higher than 25% in 3 of 5 one-minute observation intervals.

    Metric eventMetric keyThresholdViolating samplesSliding windowDealerting samples

    High GC suspension time

    builtin:tech.jvm.memory.gc.suspensionTime

    25 %

    3

    5

    5

    High GC total collection time

    builtin:tech.jvm.memory.gc.collectionTime

    24 s

    3

    5

    5

  4. Select Save changes.

Related topics
  • Metric events

    Learn about metric events in Dynatrace

  • Static thresholds for infrastructure monitoring

    Learn about the fixed thresholds used by Dynatrace to determine when a detected slowdown or error-rate increase justifies the generation of a new problem event.