Elasticsearch - Java insufficient memory


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

4 cores
600MB free

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

ok, thank you for the quick reply.