Elasticsearch memory problems

Ideally elastic search jvm needs more memory for faster processing and querying multiple shards. However, the jvm size should not be more than the system memory size. Change the memory for elastic search as per your configuration in

/etc/elasticsearch/jvm.options:

-Xms4g (Minimum memory) -Xmx4g (Maximum memory)

Set it to the exactly half of the machine memory for ideal use


For the current version of elastic (5.X) you can configure jvm startup options in the jvm.options file usually located under directory /etc/elasticsearch/jvm.options:

-Xms1g -Xmx1g

Hope it helps.


You have configured a virtual machine with 1 GB of RAM, but elastic is trying to start with 2 GB of RAM (default for Elasticsearch version 5.X)

Either give more memory to your VM, or change Elasticsearch JVM settings /etc/elasticsearch/jvm.options and lower the values of the following parameters: -Xms512m -Xmx512m


You need to start elasticsearch by the following parameters: ./bin/elasticsearch -Xmx512m -Xms512

However it seems your memory (1G) is too low for running elasticsearch.