# JVM error in elasticsearch

**URL:** <https://discuss.elastic.co/t/jvm-error-in-elasticsearch/239701>\
**Category:** Elasticsearch\
**Created:** [July 2, 2020, 6:42pm UTC](https://discuss.elastic.co/t/jvm-error-in-elasticsearch/239701 "2020-07-02T18:42:02Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ganesh2303](https://avatars.discourse-cdn.com/v4/letter/g/57b2e6/32.png) [@Ganesh2303](https://discuss.elastic.co/u/Ganesh2303)\
**Post date:** [July 2, 2020, 6:42pm UTC](https://discuss.elastic.co/t/jvm-error-in-elasticsearch/239701/1 "2020-07-02T18:42:02Z")

</div>

HI Team,  
when i try to star the elasticsearch service it throwing below error

```
   > Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x00002b76c9990000, 33661845504, 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 33661845504 bytes for committing reserved memory.
> # An error report file with more information is saved as:
> # logs/hs_err_pid21474.log

```

-Xms32g  
-Xmx32g

```
  total used free shared buff/cache available

```

Mem: 65808096 31358668 29162892 2922192 5286536 30995364  
Swap: 2097148 954064 1143084

Can anyone help how to resolve this issue

---

<div class="post-metadata">

**Author:** ![Vinayak\_Sapre](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vinayak_sapre/32/45939_2.png) [@Vinayak\_Sapre](https://discuss.elastic.co/u/Vinayak_Sapre)\
**Post date:** [July 2, 2020, 6:51pm UTC](https://discuss.elastic.co/t/jvm-error-in-elasticsearch/239701/2 "2020-07-02T18:51:00Z")

</div>

Ganesh,  
You have 29162892 (~27GB) free memory. You are trying to allocate (-Xms32g) 32GB. So you get

> [@Ganesh2303](#):
>
> `There is insufficient memory for the Java Runtime Environment to continue.`

---

<div class="post-metadata">

**Author:** ![Ganesh2303](https://avatars.discourse-cdn.com/v4/letter/g/57b2e6/32.png) [@Ganesh2303](https://discuss.elastic.co/u/Ganesh2303)\
**Post date:** [July 2, 2020, 6:54pm UTC](https://discuss.elastic.co/t/jvm-error-in-elasticsearch/239701/3 "2020-07-02T18:54:30Z")

</div>

> [@Vinayak\_Sapre](#):
>
> You have 29162892 (~27GB) free memory. You are trying to allocate (-Xms32g) 32GB. So you get

Just correct me @Vinayak_Sapre my total RAM capacity is 64 GB and in that i have assigned 32 GB. last 6 month my service is running with same setting and it happens suddenly.

How can i resolve it and i have 2 more data node with same congifuration and those servers working fine.  
Im using version 6.4

---

<div class="post-metadata">

**Author:** ![Vinayak\_Sapre](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vinayak_sapre/32/45939_2.png) [@Vinayak\_Sapre](https://discuss.elastic.co/u/Vinayak_Sapre)\
**Post date:** [July 2, 2020, 7:09pm UTC](https://discuss.elastic.co/t/jvm-error-in-elasticsearch/239701/4 "2020-07-02T19:09:29Z")

</div>

Ganesh,  
Other processes running on this specific machines were taking up 31358668 (~30GB) at the time of ES start. You cannot compare with other nodes or past history of this node.

If you are still seeing the issue, "top" command with sort on memory (shift+m) will give you processes consuming most memory.

---

<div class="post-metadata">

**Author:** ![Ganesh2303](https://avatars.discourse-cdn.com/v4/letter/g/57b2e6/32.png) [@Ganesh2303](https://discuss.elastic.co/u/Ganesh2303)\
**Post date:** [July 3, 2020, 4:58am UTC](https://discuss.elastic.co/t/jvm-error-in-elasticsearch/239701/5 "2020-07-03T04:58:06Z")

</div>

> [@Vinayak\_Sapre](#):
>
> If you are still seeing the issue, "top" command with sort on memory (shift+m) will give you processes consuming most memory.

when i check with TOP command and im getting below output,

```
  PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
24990 root 20 0 30.8g 29.3g 166360 S 0.0 46.7 33:20.74 rsyslogd

```

---

<div class="post-metadata">

**Author:** ![Vinayak\_Sapre](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vinayak_sapre/32/45939_2.png) [@Vinayak\_Sapre](https://discuss.elastic.co/u/Vinayak_Sapre)\
**Post date:** [July 3, 2020, 5:23am UTC](https://discuss.elastic.co/t/jvm-error-in-elasticsearch/239701/6 "2020-07-03T05:23:38Z")

</div>

Ganesh,  
I don't know much about rsyslogd debugging. But that process is your issue.

---

<div class="post-metadata">

**Author:** ![Ganesh2303](https://avatars.discourse-cdn.com/v4/letter/g/57b2e6/32.png) [@Ganesh2303](https://discuss.elastic.co/u/Ganesh2303)\
**Post date:** [July 3, 2020, 5:27am UTC](https://discuss.elastic.co/t/jvm-error-in-elasticsearch/239701/7 "2020-07-03T05:27:37Z")

</div>

> [@Vinayak\_Sapre](#):
>
> I don't know much about rsyslogd debugging. But that process is your issue.

Thanks a lot @Vinayak_Sapre .

---

<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:** [July 31, 2020, 5:27am UTC](https://discuss.elastic.co/t/jvm-error-in-elasticsearch/239701/8 "2020-07-31T05:27:39Z")

</div>

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