Error occurred during initialization of VM Could not reserve enough space for 1048576KB object heap - ElasticSearch


(Prewin) #1

Goto ElasticSearch bin directory.
Eg:\ElasticSearch\elasticsearch-2.0.0\bin

Right click elasticsearch.in.bat ->edit

change

if "%ES_MAX_MEM%" == "" (
set ES_MAX_MEM=1g
)

to

if "%ES_MAX_MEM%" == "" (
set ES_MAX_MEM=512m
)

save & close.


Issue with installing elasticsearch in windows 8.1
(Gaurav Singh) #2

Hi,

I faced same issue.

To resolve the issue:

In environment variable add new variable

Hope it helps.

Thanks,
Gaurav


(Praful) #3

Installation for ElasticSearch

  1. Comment entry in C:\ELK\elasticsearch-5.4.0\elasticsearch-5.4.0\config\jvm.options

#-Xms2g
#-Xmx2g

  1. set ES_JAVA_OPTS as below in elasticsearch.bat
    set ES_JAVA_OPTS = "-Xms512m -Xmx512m"

(system) #4