From fa53047961e05d65dd0761974df02d0aff8934f2 Mon Sep 17 00:00:00 2001 From: Shunji Zhan Date: Thu, 10 Oct 2024 16:31:28 +0800 Subject: [PATCH] log before err --- packages/eth-rpc-adapter/scripts/health-check.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/eth-rpc-adapter/scripts/health-check.sh b/packages/eth-rpc-adapter/scripts/health-check.sh index 24c52bbd8..70906abf7 100755 --- a/packages/eth-rpc-adapter/scripts/health-check.sh +++ b/packages/eth-rpc-adapter/scripts/health-check.sh @@ -1,7 +1,7 @@ #!/bin/bash HEALTH_CHECK_URL="http://localhost:8545" -MAX_ATTEMPTS=60 +MAX_ATTEMPTS=30 INTERVAL=1 attempt=0 @@ -26,5 +26,7 @@ while [ $attempt -lt $MAX_ATTEMPTS ]; do attempt=$((attempt+1)) done +pm2 logs eth-rpc + echo "❌ eth rpc failed to start in $MAX_ATTEMPTS seconds" exit 1 \ No newline at end of file