On my Windows 10 machine I'm trying to start Elasticsearch 5.2.0 which fails with a following error:
D:\Tools\elasticsearch-5.2.0\bin>elasticsearch.bat
Error occurred during initialization of VM
Could not reserve enough space for 2097152KB object heap
Right now I have 20GB free RAM.
How to resolve this issue ?
Change the JVM options of Elasticsearch before launch it.
Basically go to your config/jvm.options and change the values of
-Xms2g ---> to some megabytes (200 MB)
-Xmx2g ---> to some megabytes (500 MB)
here 2g refers to 2GB so change to 200MB it should 200m
For example change it to below value
-Xms200m
-Xmx500m
It worked for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With