From 9756fad46fea94e4a0b6c425ad830580b011be0e Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 4 Nov 2026 17:40:36 +0000 Subject: [PATCH] fix(swarm): retry failed tasks 5 times, 60s apart After a node restarts, image pulls can fail for a few minutes. With max_attempts 3 and 5s delay, a rescheduled task used up all retries in that window and the service stayed down. 5 attempts 60s apart cover about 5 minutes. Refs buzz-code/ops#31 Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_012GTicuLHoZVhu892FpPTnw --- docker-compose-swarm.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docker-compose-swarm.yml b/docker-compose-swarm.yml index fa8c84fb..f2980fd0 100644 --- a/docker-compose-swarm.yml +++ b/docker-compose-swarm.yml @@ -28,8 +28,8 @@ services: delay: 5s restart_policy: condition: on-failure - delay: 5s - max_attempts: 3 + delay: 60s + max_attempts: 5 window: 120s healthcheck: test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:80/"] @@ -72,8 +72,8 @@ services: delay: 5s restart_policy: condition: on-failure - delay: 5s - max_attempts: 3 + delay: 60s + max_attempts: 5 window: 120s healthcheck: test: ["CMD", "node", "-e", "require('http').get('http://localhost:3000/health', (r) => process.exit(r.statusCode === 200 ? 0 : 1))"]