# ElasticSearch 7.2.0 immediately fails with Java out of memory error

**URL:** <https://discuss.elastic.co/t/elasticsearch-7-2-0-immediately-fails-with-java-out-of-memory-error/192048>\
**Category:** Elasticsearch\
**Created:** [July 24, 2019, 2:02pm UTC](https://discuss.elastic.co/t/elasticsearch-7-2-0-immediately-fails-with-java-out-of-memory-error/192048 "2019-07-24T14:02:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![paulwnelson](https://avatars.discourse-cdn.com/v4/letter/p/dfb087/32.png) [@paulwnelson](https://discuss.elastic.co/u/paulwnelson)\
**Post date:** [July 24, 2019, 2:02pm UTC](https://discuss.elastic.co/t/elasticsearch-7-2-0-immediately-fails-with-java-out-of-memory-error/192048/1 "2019-07-24T14:02:24Z")

</div>

Java version 1.8.0\_221  
32 Gigs of memory on machine

If we choose anything over 2048m for the heap size ( like 4096m in the attached screenshot ) elastic search dies IMMEDIATELY upon launch.

The memory shows as only 20% utilized.

If we run it with a small heap, like 2048m, it fails eventually, but sometimes can run for a while.

![memory-error](https://us1.discourse-cdn.com/elastic/original/3X/4/4/44b8d1b4de16261bf9ee99c346760560f35328e7.png)

---

<div class="post-metadata">

**Author:** ![rjernst](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rjernst/32/6363_2.png) [@rjernst](https://discuss.elastic.co/u/rjernst)\
**Post date:** [July 26, 2019, 5:37pm UTC](https://discuss.elastic.co/t/elasticsearch-7-2-0-immediately-fails-with-java-out-of-memory-error/192048/2 "2019-07-26T17:37:08Z")

</div>

Please don't post images of text as they are hardly readable and not searchable. Instead paste the text and format it with `</>` icon. Check the preview window.

Could you please provide your jvm options file as text? The error you are receiving is not due to max heap size, but instead due to direct memory. Elasticsearch automatically tries to choose a direct memory size based on several factors, but seeing the entire jvm.options will help determine what is happening.

---

<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 23, 2019, 5:37pm UTC](https://discuss.elastic.co/t/elasticsearch-7-2-0-immediately-fails-with-java-out-of-memory-error/192048/3 "2019-08-23T17:37:15Z")

</div>

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