# GC suspension heap old gen spike

**URL:** <https://community.dynatrace.com/t/gc-suspension-heap-old-gen-spike/33579>\
**Category:** Container platforms\
**Tags:** problems-classic, automation, docker\
**Created:** [December 17, 2021, 5:39am UTC](https://community.dynatrace.com/t/gc-suspension-heap-old-gen-spike/33579 "2021-12-17T05:39:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![shahrukh\_niazi](https://avatars.discourse-cdn.com/v4/letter/s/ecd19e/32.png) [@shahrukh\_niazi](https://community.dynatrace.com/u/shahrukh_niazi)\
**Post date:** [December 17, 2021, 5:39am UTC](https://community.dynatrace.com/t/gc-suspension-heap-old-gen-spike/33579/1 "2021-12-17T05:39:49Z")

</div>

Is there an easy way to trigger a heap dump when an alert condition is breached in ONEAgent Dynatrace?.

We randomly see spikes in heap used old gen, gc suspension spikes in our docker container. Heap is set to 9Gb. Many APIs are being used in the container. Sometimes OOM conditions happens fast, docker instance crashes and immediately start a new one.

The only reliable way to see what is growing inside the heap is to take a heap dump. But by the time any memory dump can be manually Tigger, new docker instance is started

Can i trigger a heap dump \*automatically\* on say when heap grows \>65% via api, how?

---

<div class="post-metadata">

**Author:** ![ChadTurner](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/chadturner/32/161_2.png) [@ChadTurner](https://community.dynatrace.com/u/ChadTurner)\
**Post date:** [March 30, 2022, 3:49pm UTC](https://community.dynatrace.com/t/gc-suspension-heap-old-gen-spike/33579/2 "2022-03-30T15:49:47Z")

</div>

You can trigger Memory Dumps but you will need an AG to support this.&nbsp;[Configure ActiveGate for memory dump storage — Dynatrace Docs](https://www.dynatrace.com/support/help/how-to-use-dynatrace/diagnostics/memory-dump-analysis/configure-an-activegate-for-memory-dump-storage)
