Elasticsearch 5.1.x bootstrap check failed heap size


#1

Hi,
Am running into issues trying to get my ES cluster up and running when on non-local host settings. Getting bootstrap failures with
initial heap size [33554432] not equal to maximum heap size [524288000]; this can cause resize pauses and prevents mlockall from locking the entire heap

I understand the nature of these errors and have changed configuration (jvm.opts) to have equal sizes of 2g. That hasn't done any good. Still the same error with same mismatch values.

Out of curiosity, ran java -XX:+PrintFlagsFinal -version | grep HeapSize and got below output

uintx ErgoHeapSizeLimit = 0 {product}
uintx HeapSizePerGCThread = 87241520 {product}
uintx InitialHeapSize := 33554432 {product}
uintx LargePageHeapSizeThreshold = 134217728 {product}
uintx MaxHeapSize := 524288000 {product}

As you can see, these numbers match to the error I am getting. Which means ES server is ignoring jvm.opts and picking those values from somewhere else. So, thought explicitly setting JAVA_TOOL_OPTIONS might help. And, so I did by setting both (-Xmx and -Xms) to 2g.

However, when I try and start the server, still the same error as before (shows the same min/max values).
Curious as to where these values are being picked up from ?

This really is a blocker if the settings aren't read as expected from the relevant sources. Would really appreciate if someone could point me in a direction that I might've missed configuring.

Cheers.


(Colin Goodheart-Smithe) #2

Which distribution of elasticsearch are you installing (zip, tar, deb or rpm)? Note that for deb and rpm installations jvm.options needs to be located in /etc/elasticsearch/jvm.options and for zip or tar installations it needs to be located in config/jvm.options relative to the directory you unzipped elasticsearch into. More infor can be found here: https://www.elastic.co/guide/en/elasticsearch/reference/current/setting-system-settings.html#jvm-options

Also note that you can set JVM options via the environment variable ES_JAVA_OPTS (I'm not sure if JAVA_TOOL_OPTIONS will be picked up but ES_JAVA_OPTS should definitely be picked up). More information on this can be found at the bottom of this page: https://www.elastic.co/guide/en/elasticsearch/reference/current/heap-size.html

Hope that helps


#3

Hi,
Thanks for taking time and responding.
It's a deb package on EC2 and I did have jvm.options in /etc/elasticsearch. Turns out the elasticsearch-ansible role am using is deleting the default config and loading the jvm.options in to /etc/elasticsearch/{{instanceId}}. Is there anyway I can configure ES to look at a diff place for jvm.options ?

Cheers.


(Colin Goodheart-Smithe) #4

You can set the environment variable ES_JVM_OPTIONS to be the path to file containing JVM options


(system) #5

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