-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Description
Elasticsearch version: 5.2.2
Plugins installed: []
JVM version: 1.8u121
OS version: Windows 2008R2
Description of the problem including expected versus actual behavior:
Trying to set Java heap size via the Environment Variable ES_JAVA_OPTS fails with an error message "duplicate min heap size settings found"
The problem is that %ES_HOME%\config\jvm.options is read, including the -Xms and -Xmx options, and then ES_JAVA_OPTS is appended at the end, so you get another set of -Xms and -Xmx options, which then fails with the error above.
Steps to reproduce:
SET ES_JAVA_OPTS=-Xms3g -Xmx3g- call
bin\elasticsearch-service.bat
Provide logs (if relevant): value of ES_JAVA_OPTS (notice 2g value at beginning and 3g value at end):
-Xms2g;-Xmx2g;-XX:+UseConcMarkSweepGC;-XX:CMSInitiatingOccupancyFraction=75;-XX:+UseCMSInitiatingOccupancyOnly;-XX:+DisableExplicitGC;-XX:+AlwaysPreTouch;-Xss1m;-Djava.awt.headless=true;-Dfile.encoding=UTF-8;-Djna.nosys=true;-Djdk.io.permissionsUseCanonicalPath=true;-Dio.netty.noUnsafe=true;-Dio.netty.noKeySetOptimization=true;-Dio.netty.recycler.maxCapacityPerThread=0;-Dlog4j.shutdownHookEnabled=false;-Dlog4j2.disable.jmx=true;-Dlog4j.skipJansi=true;-XX:+HeapDumpOnOutOfMemoryError;-Xms3g;-Xmx3g
duplicate min heap size settings found
Possibly related to #20899