From 007af7652522da766b61f8fb791e7b51761aadd8 Mon Sep 17 00:00:00 2001 From: hermes-agent Date: Sun, 30 Aug 2026 21:40:44 +0000 Subject: [PATCH] fix(hermes_infra): hermes-gateway healthcheck + stop_grace_period prod-gateway gets SIGTERM from s6 because no healthcheck exists and default stop_grace_period (10s) is shorter than Hermes' shutdown drain. Add TCP healthcheck on the dashboard port (8087), stop_grace_period=60s, and a backoff (delay=5s, max_attempts=5) on restart_policy so the daemon survives a long FTS backlog without flapping into 'interrupting remaining work' / 'Scheduled auto-resume' cycles. Refs admin/ansible#26. --- hermes_squid/stack-compose.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/hermes_squid/stack-compose.yml b/hermes_squid/stack-compose.yml index f7bd2f8..6a6d21b 100644 --- a/hermes_squid/stack-compose.yml +++ b/hermes_squid/stack-compose.yml @@ -114,6 +114,15 @@ services: memory: 1G restart_policy: condition: on-failure + delay: 5s + max_attempts: 5 + healthcheck: + test: ["CMD", "python3", "-c", "import socket; s=socket.socket(); s.settimeout(2); s.connect(('127.0.0.1', 8087))"] + interval: 30s + timeout: 5s + retries: 3 + start_period: 60s + stop_grace_period: 60s hermes-ui: image: nginx:alpine -- 2.54.0