# Maximum heap reached and GC not working

**URL:** https://discuss.elastic.co/t/maximum-heap-reached-and-gc-not-working/241436
**Category:** Elasticsearch
**Created:** [July 16, 2020, 10:43am UTC](https://discuss.elastic.co/t/maximum-heap-reached-and-gc-not-working/241436 "2020-07-16T10:43:58Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Barak](https://avatars.discourse-cdn.com/v4/letter/b/dbc845/32.png) [@Barak](https://discuss.elastic.co/u/Barak)
#### Post date: [July 16, 2020, 10:43am UTC](https://discuss.elastic.co/t/maximum-heap-reached-and-gc-not-working/241436/1 "2020-07-16T10:43:59Z")

</div>

Hi,

As can be seen in the attached screenshot, at around 06:45:20 the heap scrapes the limit, when the GC count is 0 for the next minute.  
This causes this node to be unresponsive for this time period.

It happens quite frequently from various nodes in the cluster (there are 9 data nodes)

I got the GC logs but can't quite understand what causes it, except for the long "Safepoint cleanup" starting at 03:45:29

> <https://gist.github.com/barakseri1/fa4c4bf6f635c6c2791f131019790844>

I am using ES version 7.7.1

 ![Screen Shot 2020-07-16 at 13.24.35](https://us1.discourse-cdn.com/elastic/original/3X/6/b/6b36d5a68b6e004aa37b96f561787c6c58a54a25.png)

---

<div class="post-metadata">

### Author: ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)
#### Post date: [July 16, 2020, 10:57am UTC](https://discuss.elastic.co/t/maximum-heap-reached-and-gc-not-working/241436/2 "2020-07-16T10:57:21Z")

</div>

What type of hardware are you using?

---

<div class="post-metadata">

### Author: ![Barak](https://avatars.discourse-cdn.com/v4/letter/b/dbc845/32.png) [@Barak](https://discuss.elastic.co/u/Barak)
#### Post date: [July 16, 2020, 11:23am UTC](https://discuss.elastic.co/t/maximum-heap-reached-and-gc-not-working/241436/3 "2020-07-16T11:23:08Z")

</div>

aws instance m5/m5a.4xlarge - 64GB, 16vCPU

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [August 13, 2020, 11:23am UTC](https://discuss.elastic.co/t/maximum-heap-reached-and-gc-not-working/241436/4 "2020-08-13T11:23:11Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
