ElasticSearch not starting after export ES_HEAP_SIZE=10g

Hi Elastic Team

I was having some memeory issue where Elasticseach was not start after a reload . Even No logs were genrated . after searching on google I notice that issue could be related to HEAP size .

I used the following command after reading on elastic site to increase the heapsize from 2g to 4gb .

[root@bin]# export ES_HEAP_SIZE=10g

I am now getting the following error when I try to start the elasticsearch . Please advise what is the option to disable the above command and how can I increase heap value .

[root@bin]#./elasticsearch
Error: encountered environment variables that are no longer supported
Use jvm.options or ES_JAVA_OPTS to configure the JVM
ES_HEAP_SIZE=10g: set -Xms10g and -Xmx10g in jvm.options or add "-Xms10g -Xmx10g" to ES_JAVA_OPTS

The error message explains exactly what you need to do. What is unclear in this message?

Use the below commands

unset ES_HEAP_SIZE
And modify the file in /etc/elasticsearch/jvm.options

Modify the below line in the above file

Xms represents the initial size of total heap space

Xmx represents the maximum size of total heap space

-Xms2g
-Xmx2g

--
Niraj

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