Move heap configuration to before the first time elasticsearch is started. (#89)
This makes sure the -Xmx and -Xms values are set to their configured values when `elasticsearch --version` is called so the container can run in memory-restricted environments. Co-authored-by: Ibone González Mauraza <gibone@vmware.com>
This commit is contained in:
parent
8a91779d0f
commit
895f77c886
|
|
@ -445,6 +445,7 @@ elasticsearch_initialize() {
|
|||
am_i_root && chown -R "$ELASTICSEARCH_DAEMON_USER:$ELASTICSEARCH_DAEMON_GROUP" "$dir"
|
||||
done
|
||||
|
||||
|
||||
if is_file_writable "${ELASTICSEARCH_CONF_DIR}/jvm.options"; then
|
||||
if is_boolean_yes "$ELASTICSEARCH_DISABLE_JVM_HEAP_DUMP"; then
|
||||
info "Disabling JVM heap dumps..."
|
||||
|
|
@ -459,6 +460,7 @@ elasticsearch_initialize() {
|
|||
warn "The '${ELASTICSEARCH_CONF_DIR}/jvm.options' file is not writable. Configurations based on environment variables will not be applied for this file"
|
||||
fi
|
||||
|
||||
|
||||
if [[ -f "$ELASTICSEARCH_CONF_FILE" ]]; then
|
||||
info "Custom configuration file detected, using it..."
|
||||
else
|
||||
|
|
|
|||
|
|
@ -459,6 +459,7 @@ elasticsearch_initialize() {
|
|||
warn "The '${ELASTICSEARCH_CONF_DIR}/jvm.options' file is not writable. Configurations based on environment variables will not be applied for this file"
|
||||
fi
|
||||
|
||||
|
||||
if [[ -f "$ELASTICSEARCH_CONF_FILE" ]]; then
|
||||
info "Custom configuration file detected, using it..."
|
||||
else
|
||||
|
|
|
|||
Loading…
Reference in New Issue