# Notification for excessive Full Garbage Collections in a JVM

**URL:** <https://community.dynatrace.com/t/notification-for-excessive-full-garbage-collections-in-a-jvm/33817>\
**Category:** Alerting\
**Tags:** garbage-collection, problem-detection, problem-notification, problems-classic, java\
**Created:** [January 20, 2022, 6:27am UTC](https://community.dynatrace.com/t/notification-for-excessive-full-garbage-collections-in-a-jvm/33817 "2022-01-20T06:27:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![SteveHall](https://avatars.discourse-cdn.com/v4/letter/s/91b2a8/32.png) [@SteveHall](https://community.dynatrace.com/u/SteveHall)\
**Post date:** [January 20, 2022, 6:27am UTC](https://community.dynatrace.com/t/notification-for-excessive-full-garbage-collections-in-a-jvm/33817/1 "2022-01-20T06:27:05Z")

</div>

One of our applications that Dynatrace monitors recently had 172 Full GCs in a one hour period.

256 garbage collections were performed in a one hour period and 172 of those (67.1875%) were Full GCs.

While our organization does not subscribe to Dynatrace’s log monitoring, you can see from the verbose garbage collection log that indeed, 172 of 256 GCs in a one hour window were Full GCs.

 ![Full GCs versus Total GCs in one hour.png](https://global.discourse-cdn.com/dynatrace/original/3X/e/7/e7ae512c70c882627b594493b489edfa2b8a8d07.png)

It’s disappointing that Dynatrace doesn’t have a ready-made alert for excessive Full GCs. I am less concerned that there are x GCs in a certain period than I am that there are y GCs in that same period.

This seems to be a perfect use case for Dynatrace monitoring a JVM and to require the log monitoring solution on top doesn’t fit our current needs.

Please find a way to help monitor Oracle’s Java 8 Hotspot JVMs for excessive Full GCs in a future OneAgent.

Thank you!

---

<div class="post-metadata">

**Author:** ![matthias\_dillie](https://avatars.discourse-cdn.com/v4/letter/m/e95f7d/32.png) [@matthias\_dillie](https://community.dynatrace.com/u/matthias_dillie)\
**Post date:** [January 24, 2022, 8:53am UTC](https://community.dynatrace.com/t/notification-for-excessive-full-garbage-collections-in-a-jvm/33817/2 "2022-01-24T08:53:15Z")

</div>

Hi Steve

Dynatrace has an anomaly detection setting (Extension events) for ‘High GC time’. I think this is what you should monitor.  
To see full GCs, maybe you can use a java method sensor? You also can try jmx measures. Maybe you find some hints here:

> <https://gist.github.com/huynhbaoan/1bb4cd87313f56bc63cc4e19ce5c3ec7>

[https://stackoverflow.com/questions/4633582/is-it-possible-to-monitor-full-gc-frequency-in-jmx-on-hotspot](https://stackoverflow.com/questions/4633582/is-it-possible-to-monitor-full-gc-frequency-in-jmx-on-hotspot)

Regards

Matthias

---

<div class="post-metadata">

**Author:** ![Peter\_Youssef](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/peter_youssef/32/14668_2.png) [@Peter\_Youssef](https://community.dynatrace.com/u/Peter_Youssef)\
**Post date:** [December 25, 2024, 4:40pm UTC](https://community.dynatrace.com/t/notification-for-excessive-full-garbage-collections-in-a-jvm/33817/3 "2024-12-25T16:40:17Z")

</div>

Thanks&nbsp;[@matthias\_dillie](https://community.dynatrace.com/user/11732)&nbsp;for sharing the applicable solution.
