# Java Heap Space

**URL:** <https://discuss.elastic.co/t/java-heap-space/225496>\
**Category:** Logstash\
**Created:** [March 28, 2020, 3:34pm UTC](https://discuss.elastic.co/t/java-heap-space/225496 "2020-03-28T15:34:47Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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 28, 2020, 5:36pm UTC](https://discuss.elastic.co/t/java-heap-space/225496/2 "2020-03-28T17:36:49Z")

</div>

> [@hariskhalique](#):
>
> I am getting OutOfMemoryError

Enable a heap dump when you run out of memory. Analyze the heap dump with a memory analyzer (personally I like [Eclipse MAT](https://www.eclipse.org/mat/)). Tell us what the leak candidates are, what OS you are on, and what JVM you are using (java -version).

---

_[View the full topic](https://discuss.elastic.co/t/java-heap-space/225496)._
