# Out of memory exception for coordinating nodes

**URL:** <https://discuss.elastic.co/t/out-of-memory-exception-for-coordinating-nodes/216538>\
**Category:** Elasticsearch\
**Created:** [January 25, 2020, 7:07pm UTC](https://discuss.elastic.co/t/out-of-memory-exception-for-coordinating-nodes/216538 "2020-01-25T19:07:25Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![deebify](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/deebify/32/61446_2.png) [@deebify](https://discuss.elastic.co/u/deebify)\
**Post date:** [January 25, 2020, 7:07pm UTC](https://discuss.elastic.co/t/out-of-memory-exception-for-coordinating-nodes/216538/1 "2020-01-25T19:07:25Z")

</div>

I've a ES cluster 6.6.2 composed of 3 master, 4 datanodes, 2 coordinating nodes.  
2 kibana instances connecting to 2 coordinating nodes.

2 coordinating nodes are 16GB of RAM, and 7GB of Heap (min=max heap).  
On coordinating nodes only I face "out of memory exception" and O.S kill jvm process for elastichsearch.

I've enabled the bootstrap memory lock, and followed documentations.

[https://www.elastic.co/guide/en/elasticsearch/reference/6.6/\_memory\_lock\_check.html](https://www.elastic.co/guide/en/elasticsearch/reference/6.6/_memory_lock_check.html)

Any idea what to do to prevent out-of-memory and keep service is up?

---

<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:** [January 27, 2020, 9:46am UTC](https://discuss.elastic.co/t/out-of-memory-exception-for-coordinating-nodes/216538/2 "2020-01-27T09:46:24Z")

</div>

Two questions:

First: What kind of queries are you sending to those nodes? Are your querying a lot of shards in a single query or paginating deep?

Second: How exactly is the Elasticsearch process being killed? Can you share log file output, and is the kernel OOM killer doing this or is there an exception in the logs?

---

<div class="post-metadata">

**Author:** ![deebify](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/deebify/32/61446_2.png) [@deebify](https://discuss.elastic.co/u/deebify)\
**Post date:** [January 31, 2020, 3:45pm UTC](https://discuss.elastic.co/t/out-of-memory-exception-for-coordinating-nodes/216538/3 "2020-01-31T15:45:52Z")

</div>

Yes, the queries are hitting several shards, usually kibana is hitting different indexes.  
Most of works on Kibana.

from systemd:  
Jan 21 15:08:40 elk.novalocal systemd[1]: elasticsearch.service: main process exited, code=killed, status=9/KILL  
Jan 21 15:08:40 elk.novalocal systemd[1]: Unit elasticsearch.service entered failed state.  
Jan 21 15:08:40 elk.novalocal systemd[1]: elasticsearch.service failed.

Status for monitoring.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/e/6/e695e4a57e81576f7c8dd06e8e79abc487d0a35b.png)

---

<div class="post-metadata">

**Author:** ![deebify](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/deebify/32/61446_2.png) [@deebify](https://discuss.elastic.co/u/deebify)\
**Post date:** [January 31, 2020, 3:47pm UTC](https://discuss.elastic.co/t/out-of-memory-exception-for-coordinating-nodes/216538/4 "2020-01-31T15:47:14Z")

</div>

I see the heap is never reached to the maximum? so why the service stops itself.

---

<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:** [February 3, 2020, 3:06pm UTC](https://discuss.elastic.co/t/out-of-memory-exception-for-coordinating-nodes/216538/5 "2020-02-03T15:06:28Z")

</div>

how is the service stopped? Please check the ES logfile and the `dmesg` output... are there any mentions?

--Alex

---

<div class="post-metadata">

**Author:** ![deebify](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/deebify/32/61446_2.png) [@deebify](https://discuss.elastic.co/u/deebify)\
**Post date:** [February 15, 2020, 9:43am UTC](https://discuss.elastic.co/t/out-of-memory-exception-for-coordinating-nodes/216538/6 "2020-02-15T09:43:37Z")

</div>

> [@deebify](#):
>
> Jan 21 15:08:40 elk.novalocal systemd[1]: elasticsearch.service: main process exited, code=killed, status=9/KILL  
> Jan 21 15:08:40 elk.novalocal systemd[1]: Unit elasticsearch.service entered failed state.  
> Jan 21 15:08:40 elk.novalocal systemd[1]: elasticsearch.service failed.

From dmesg

```
Jan 21 15:08:40 elk.novalocal systemd[1]: elasticsearch.service: main process exited, code=killed, status=9/KILL
Jan 21 15:08:40 elk.novalocal systemd[1]: Unit elasticsearch.service entered failed state.
Jan 21 15:08:40 elk.novalocal systemd[1]: elasticsearch.service failed.

```

---

<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 14, 2020, 9:43am UTC](https://discuss.elastic.co/t/out-of-memory-exception-for-coordinating-nodes/216538/7 "2020-03-14T09:43:51Z")

</div>

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