# Heepoutofmemory erroe xms and xmx set to 3g but problem not solved

**URL:** <https://discuss.elastic.co/t/heepoutofmemory-erroe-xms-and-xmx-set-to-3g-but-problem-not-solved/223676>\
**Category:** Elasticsearch\
**Created:** [March 16, 2020, 12:33am UTC](https://discuss.elastic.co/t/heepoutofmemory-erroe-xms-and-xmx-set-to-3g-but-problem-not-solved/223676 "2020-03-16T00:33:48Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![eakam](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eakam/32/64468_2.png) [@eakam](https://discuss.elastic.co/u/eakam)\
**Post date:** [March 16, 2020, 12:33am UTC](https://discuss.elastic.co/t/heepoutofmemory-erroe-xms-and-xmx-set-to-3g-but-problem-not-solved/223676/1 "2020-03-16T00:33:48Z")

</div>

heepoutofmemory erroe xms and xmx set to 3g but problem not solved

cat /var/log/elasticsearch/elasticsearch.log | grep -i -E "error|warn"

output of this command:

[2020-03-16T03:59:12,934][INFO][o.e.n.Node] [node-1] JVM arguments [-Des.networkaddress.cache.ttl=60, -Des.networkaddress.cache.negative.ttl=10, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -XX:-OmitStackTraceInFastThrow, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dio.netty.allocator.numDirectArenas=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Djava.locale.providers=COMPAT, -Xms2g, -Xmx2g, -XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -Djava.io.tmpdir=/tmp/elasticsearch-13352531301192792164, -XX:+HeapDumpOnOutOfMemoryError, -XX:HeapDumpPath=/var/lib/elasticsearch, -XX:ErrorFile=/var/log/elasticsearch/hs\_err\_pid%p.log, -Xlog:gc\*,gc+age=trace,safepoint:file=/var/log/elasticsearch/gc.log:utctime,pid,tags:filecount=32,filesize=64m, -XX:MaxDirectMemorySize=1073741824, -Des.path.home=/usr/share/elasticsearch, -Des.path.conf=/etc/elasticsearch, -Des.distribution.flavor=default, -Des.distribution.type=deb, -Des.bundled\_jdk=true]

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [March 16, 2020, 1:46pm UTC](https://discuss.elastic.co/t/heepoutofmemory-erroe-xms-and-xmx-set-to-3g-but-problem-not-solved/223676/2 "2020-03-16T13:46:06Z")

</div>

Just increasing the heap randomly will not help you to find out where the memory requirement is coming from.

Your snippet (please format it, this forum supports markdown) only shows a heap of 2g however.

One of the first things is to figure out, when the out of memory exception happens. What is being executed? Can that be tracked down? Special query or an index storm?

---

<div class="post-metadata">

**Author:** ![eakam](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eakam/32/64468_2.png) [@eakam](https://discuss.elastic.co/u/eakam)\
**Post date:** [March 17, 2020, 12:54pm UTC](https://discuss.elastic.co/t/heepoutofmemory-erroe-xms-and-xmx-set-to-3g-but-problem-not-solved/223676/3 "2020-03-17T12:54:32Z")

</div>

ok sir but please help me how may i do these steps

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [March 17, 2020, 1:39pm UTC](https://discuss.elastic.co/t/heepoutofmemory-erroe-xms-and-xmx-set-to-3g-but-problem-not-solved/223676/4 "2020-03-17T13:39:41Z")

</div>

Do you know what happens with your cluster when that exception happens? indexing? querying?

Also, checking the [nodes stats API](https://www.elastic.co/guide/en/elasticsearch/reference/7.6/cluster-nodes-stats.html) regarding memory may help.

---

<div class="post-metadata">

**Author:** ![eakam](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eakam/32/64468_2.png) [@eakam](https://discuss.elastic.co/u/eakam)\
**Post date:** [March 17, 2020, 1:56pm UTC](https://discuss.elastic.co/t/heepoutofmemory-erroe-xms-and-xmx-set-to-3g-but-problem-not-solved/223676/5 "2020-03-17T13:56:44Z")

</div>

sir is this problem solved if i try to install the whole elk on another computer  
i am installiong wazuh setup for school project

---

<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:** [April 14, 2020, 1:57pm UTC](https://discuss.elastic.co/t/heepoutofmemory-erroe-xms-and-xmx-set-to-3g-but-problem-not-solved/223676/6 "2020-04-14T13:57:38Z")

</div>

Closed on April 14, 2020, 1:57pm UTC

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