From 8f92d286e35bce36382b16848ba101cc7734eae6 Mon Sep 17 00:00:00 2001 From: "Zaiming (Stone) Shi" Date: Thu, 30 Dec 2021 00:28:50 +0100 Subject: [PATCH] fix(bin/emqx): bump WAIT_FOR_ERLANG default to 150 seconds --- bin/emqx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/emqx b/bin/emqx index be18a85e7..6882a3ba0 100755 --- a/bin/emqx +++ b/bin/emqx @@ -504,7 +504,7 @@ case "$1" in "$BINDIR/run_erl" -daemon "$PIPE_DIR" "$RUNNER_LOG_DIR" \ "$(relx_start_command)" - WAIT_TIME=${WAIT_FOR_ERLANG:-15} + WAIT_TIME=${WAIT_FOR_ERLANG:-150} while [ "$WAIT_TIME" -gt 0 ]; do if ! relx_nodetool "ping" >/dev/null 2>&1; then WAIT_TIME=$((WAIT_TIME - 1)) @@ -516,7 +516,7 @@ case "$1" in echo "$EMQX_DESCRIPTION $REL_VSN is started successfully!" exit 0 fi - done && echo "$EMQX_DESCRIPTION $REL_VSN failed to start within ${WAIT_FOR_ERLANG:-15} seconds," + done && echo "$EMQX_DESCRIPTION $REL_VSN failed to start within ${WAIT_FOR_ERLANG:-150} seconds," echo "see the output of '$0 console' for more information." echo "If you want to wait longer, set the environment variable" echo "WAIT_FOR_ERLANG to the number of seconds to wait." @@ -530,7 +530,7 @@ case "$1" in echoerr "Graceful shutdown failed PID=[$PID]" exit 1 fi - WAIT_TIME="${WAIT_FOR_ERLANG_STOP:-60}" + WAIT_TIME="${WAIT_FOR_ERLANG_STOP:-120}" if ! wait_for "$WAIT_TIME" 'is_down' "$PID"; then msg="dangling after ${WAIT_TIME} seconds" # also log to syslog