# Heap Memory Jolokia

**URL:** <https://community.dremio.com/t/heap-memory-jolokia/5476>\
**Category:** Uncategorized\
**Created:** [April 30, 2020, 6:51pm UTC](https://community.dremio.com/t/heap-memory-jolokia/5476 "2020-04-30T18:51:29Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Manish](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@Manish](https://community.dremio.com/u/Manish)\
**Post date:** [April 30, 2020, 6:51pm UTC](https://community.dremio.com/t/heap-memory-jolokia/5476/1 "2020-04-30T18:51:30Z")

</div>

we have Dremio production Env and setup one master and 4 coordinator nodes but daily bases we are getting Jolokia memory heap usages alerts so how we can fix.

Please suggest quick action really appreciated

---

<div class="post-metadata">

**Author:** ![ben](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/ben/32/1367_2.png) [@ben](https://community.dremio.com/u/ben)\
**Post date:** [April 30, 2020, 11:47pm UTC](https://community.dremio.com/t/heap-memory-jolokia/5476/2 "2020-04-30T23:47:18Z")

</div>

@Manish, what are the heap usage alerts reporting?

---

<div class="post-metadata">

**Author:** ![Manish](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@Manish](https://community.dremio.com/u/Manish)\
**Post date:** [May 2, 2020, 5:31pm UTC](https://community.dremio.com/t/heap-memory-jolokia/5476/3 "2020-05-02T17:31:56Z")

</div>

Hi Ben,

Thanks for your response

.Now we have set the threshold limit 85 percentages and the issue came within 24 hours 15 -20 time. How we can fix and why this is coming frequently.

Also one more query if we are getting out of memory issue comes then how we can resolve and what things we need to check in our side. Please suggest

Thanks in advance.

Regards,  
Manish.

---

<div class="post-metadata">

**Author:** ![ben](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/ben/32/1367_2.png) [@ben](https://community.dremio.com/u/ben)\
**Post date:** [May 2, 2020, 6:00pm UTC](https://community.dremio.com/t/heap-memory-jolokia/5476/4 "2020-05-02T18:00:09Z")

</div>

@Manish,  
Dremio will periodically reach the maximum heap limit and then the [JVM will reclaim this memory in the usual garbage collection cycle](https://docs.dremio.com/advanced-administration/monitoring.html#heap-memory-usage-and-gc-frequency). This is not necessarily a problem. If you are receiving Out Of Memory errors, then you either need to change your queries or scale you resources.

How much memory, heap and direct, have you allocated to your executors and coordinator?

Here’s more information about memory configuration from our documentation: [https://docs.dremio.com/deployment/memory-config.html](https://docs.dremio.com/deployment/memory-config.html)

---

<div class="post-metadata">

**Author:** ![Manish](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@Manish](https://community.dremio.com/u/Manish)\
**Post date:** [May 4, 2020, 5:59am UTC](https://community.dremio.com/t/heap-memory-jolokia/5476/5 "2020-05-04T05:59:45Z")

</div>

@ben: sorry for my side as of now we are using one master and four executors and getting frequently memory heap issue and out of memory issue.

As you suggest the Heap memory is not an issue but for out of memory we need to check our query or update the resources also I will send my memory configuration asap then please suggest what we need to do on this situation. Thank you for your quick responses.

---

<div class="post-metadata">

**Author:** ![Manish](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@Manish](https://community.dremio.com/u/Manish)\
**Post date:** [May 4, 2020, 4:42pm UTC](https://community.dremio.com/t/heap-memory-jolokia/5476/6 "2020-05-04T16:42:23Z")

</div>

Hi Ben,

max.direct.memory.executor 102400

max.direct.memory.master 45056

max.heap.memory.executor 16384

max.heapmemory.master 16384

Is it any changes required ?

---

<div class="post-metadata">

**Author:** ![Manish](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@Manish](https://community.dremio.com/u/Manish)\
**Post date:** [May 13, 2020, 7:27am UTC](https://community.dremio.com/t/heap-memory-jolokia/5476/7 "2020-05-13T07:27:27Z")

</div>

Hi @ben

One query I have, could you please let me know why most of the time only executor 3 nodes took maximum heap memory. As of now, we have 4 Executors.

Could you please let me know your ideas about this.

---

<div class="post-metadata">

**Author:** ![ben](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/ben/32/1367_2.png) [@ben](https://community.dremio.com/u/ben)\
**Post date:** [May 13, 2020, 6:14pm UTC](https://community.dremio.com/t/heap-memory-jolokia/5476/8 "2020-05-13T18:14:44Z")

</div>

I would actually reduce the heap on the executor to only 4 GB. But the problem likely is in the query itself. Some operation is too heap expensive.

Can you share the profile for the job?
