Initial heap size not equal to maximum heap size

I'm trying to start elasticsearch v5 alpha 2 on an AWS EC2 instance with 8GB memory, and keep getting this error on startup:

initial heap size [268435456] not equal to maximum heap size [1073741824]

Then elasticsearch fails to start.

I've tried setting the ES_HEAP_SIZE environment variable, and I've tried launching elasticsearch with -Xmx4g -Xms4g, and still get the same error.

What is the correct way to set the heap size?

Have you checked the jvm.options file?

1 Like

Updating jvm.options solved the problem..


1 Like

A different issue to link to is #18462. While the issue that you link to was correct at the time, we have reverted the decision on which that issue was closed on the basis of (the position there being that we had decided to ship with default min equal to the default max). The issue #18462 contains our current thinking.

1 Like