# +HeapDumpOnOutOfMemoryError

**URL:** <https://discuss.elastic.co/t/heapdumponoutofmemoryerror/298786>\
**Category:** Logstash\
**Created:** [March 3, 2022, 7:55pm UTC](https://discuss.elastic.co/t/heapdumponoutofmemoryerror/298786 "2022-03-03T19:55:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![d6036de2b54af16665f4](https://avatars.discourse-cdn.com/v4/letter/d/b487fb/32.png) [@d6036de2b54af16665f4](https://discuss.elastic.co/u/d6036de2b54af16665f4)\
**Post date:** [March 3, 2022, 7:55pm UTC](https://discuss.elastic.co/t/heapdumponoutofmemoryerror/298786/1 "2022-03-03T19:55:22Z")

</div>

Hello

I am getting Heapdump out of memory error on my Production.. DUe to which i am getting incosistant data on kibana

Can you please help me to solve this..  
I will send you error messages  
It's Instance type is t3a.medium

in usr/share/logstash output is :

OpenJDK 64-Bit Server VM warning: INFO: os::commit\_memory(0x000000008a660000, 1973026816, 0) failed; error='Cannot allocate memory' (errno=12)

# 

# There is insufficient memory for the Java Runtime Environment to continue.

# Native memory allocation (mmap) failed to map 1973026816 bytes for committing reserved memory.

# An error report file with more information is saved as:

# /usr/share/logstash/hs\_err\_pid18330.log

Frre -h  
total used free shared buff/cache available  
Mem: 3.7G 3.3G 132M 41M 182M 85M  
Swap: 1.0G 249M 774M

top command

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/2/d/2d35a4bc192f93ef2b24f6c2a89680e421e651fa.png)

please help

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [March 3, 2022, 11:27pm UTC](https://discuss.elastic.co/t/heapdumponoutofmemoryerror/298786/2 "2022-03-03T23:27:54Z")

</div>

To find the problem you should take a look at the heap dump in a tool like [MAT](https://www.eclipse.org/mat/). If you find yourself spending more than a minute trying to work out what is using all the memory then give up. It should be front and centre on the main page. -- leak candidate #1.

See [this](https://discuss.elastic.co/t/logstash-7-5-gc-too-frequently-to-work/290331/2) thread for an example of what you should see.

---

<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:** [March 31, 2022, 11:28pm UTC](https://discuss.elastic.co/t/heapdumponoutofmemoryerror/298786/3 "2022-03-31T23:28:43Z")

</div>

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