# Elasticsearch - Java insufficient memory

**URL:** <https://discuss.elastic.co/t/elasticsearch-java-insufficient-memory/194655>\
**Category:** Elasticsearch\
**Created:** [August 9, 2019, 4:40pm UTC](https://discuss.elastic.co/t/elasticsearch-java-insufficient-memory/194655 "2019-08-09T16:40:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![David04](https://avatars.discourse-cdn.com/v4/letter/d/bbce88/32.png) [@David04](https://discuss.elastic.co/u/David04)\
**Post date:** [August 9, 2019, 4:40pm UTC](https://discuss.elastic.co/t/elasticsearch-java-insufficient-memory/194655/1 "2019-08-09T16:40:02Z")

</div>

Hello,

When I run "/usr/share/elasticsearch/bin/elasticsearch --version" I get the following Java error:

Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit\_memory(0x0000000614cc0000, 7167279104, 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 7167279104 bytes for committing reserved memory

But if I cd to the directory and run:

./elasticsearch --version if works fine with no Java errors

Is Java expecting 7167279104 (7GB) of free memory to map?

System Stats:  
Centos version  
CentOS Linux release 7.6.1810 (Core)

Elastic version  
6.7.1

VM:  
4 cores  
16GB RAM  
600MB free

---

<div class="post-metadata">

**Author:** ![venkateshreddypala](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/venkateshreddypala/32/52035_2.png) [@venkateshreddypala](https://discuss.elastic.co/u/venkateshreddypala)\
**Post date:** [August 9, 2019, 4:51pm UTC](https://discuss.elastic.co/t/elasticsearch-java-insufficient-memory/194655/2 "2019-08-09T16:51:35Z")

</div>

It's not the system memory it is the JVM in the configuration.yml that you need to configure.

---

<div class="post-metadata">

**Author:** ![David04](https://avatars.discourse-cdn.com/v4/letter/d/bbce88/32.png) [@David04](https://discuss.elastic.co/u/David04)\
**Post date:** [August 9, 2019, 4:55pm UTC](https://discuss.elastic.co/t/elasticsearch-java-insufficient-memory/194655/3 "2019-08-09T16:55:28Z")

</div>

ok, thank you for the quick reply.

---

<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:** [September 6, 2019, 4:55pm UTC](https://discuss.elastic.co/t/elasticsearch-java-insufficient-memory/194655/4 "2019-09-06T16:55:29Z")

</div>

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