How to solve the problem of es startup failure and insufficient memory?

problem:

2020-09-16 14:07:47 Commons Daemon procrun stdout initialized
Error occurred during initialization of VM
Could not reserve enough space for object heap

Solution: The
memory is not enough. To allocate memory, find the JVM configuration file and open the elasticsearch file editor in the bin directory to see:

ES_JVM_OPTIONS="$ES_PATH_CONF"/jvm.options
JVM_OPTIONS=`"$JAVA" -cp "$ES_CLASSPATH" org.elasticsearch.tools.launchers.JvmOptionsParser "$ES_JVM_OPTIONS"`
ES_JAVA_OPTS="${JVM_OPTIONS//\$\{ES_TMPDIR\}/$ES_TMPDIR} $ES_JAVA_OPTS"

All the information about JVM configuration in es is placed in the jvm.options file under conf.
Look at the comments in the jvm.options file and find:

##You should always set the min and max JVM heap

##size to the same value. For example, to set

##the heap to 4 GB, set:

##-Xms4g

##-Xmx4g

According to the example, the size of the two parameters should be the same.

In the jvm.options in the E:\154es\elasticsearch-6.2.4\config directory

-Xms1g
-Xmx1g

Just change it to 1g.

Guess you like

Origin blog.csdn.net/numbbe/article/details/108774581