fix: allow bounded PostGIS crash recovery
This commit is contained in:
@@ -56,7 +56,10 @@ echo "Starting embedded PostGIS..."
|
||||
postgres_pid="$!"
|
||||
|
||||
echo "Waiting for embedded PostGIS..."
|
||||
for attempt in $(seq 1 60); do
|
||||
# Large persistent PostGIS volumes can require several minutes of crash
|
||||
# recovery after an interrupted container replacement. Keep the wait bounded,
|
||||
# but do not terminate recovery at the former two-minute ceiling.
|
||||
for attempt in $(seq 1 450); do
|
||||
if pg_isready -h 127.0.0.1 -U "$POSTGRES_USER" -d "$POSTGRES_DB" >/dev/null 2>&1; then
|
||||
echo "PostGIS is ready after attempt ${attempt}."
|
||||
break
|
||||
@@ -69,7 +72,7 @@ for attempt in $(seq 1 60); do
|
||||
done
|
||||
|
||||
if ! pg_isready -h 127.0.0.1 -U "$POSTGRES_USER" -d "$POSTGRES_DB" >/dev/null 2>&1; then
|
||||
echo "PostGIS did not become ready."
|
||||
echo "PostGIS did not become ready within 15 minutes."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ FRONTEND_URL="${FRONTEND_URL:-http://127.0.0.1:${GEOINTEL_FRONTEND_PORT:-1202}}"
|
||||
|
||||
wait_for_geointel_health() {
|
||||
local status=""
|
||||
for attempt in $(seq 1 90); do
|
||||
for attempt in $(seq 1 480); do
|
||||
status="$(docker inspect --format '{{if .State.Health}}{{.State.Health.Status}}{{else}}{{.State.Status}}{{end}}' geointel 2>/dev/null || true)"
|
||||
if [ "$status" = "healthy" ]; then
|
||||
echo "GeoIntel container is healthy after attempt ${attempt}."
|
||||
|
||||
Reference in New Issue
Block a user