Skip to content

v0.6.4.1 — restart-loop hotfix

Choose a tag to compare

@JuansesDev JuansesDev released this 08 May 20:51
· 206 commits to main since this release

Hotfix on top of v0.6.4. No new features, no DB migrations — drop-in replacement for any 0.6.x deployment showing the "container restarts every ~5 hours" pattern.

Why upgrade

If you're running 0.6.3 or 0.6.4, your container is silently rate-limiting its own healthcheck. About 5 hours after every boot, wget /health from the Dockerfile healthcheck starts getting 429 Too Many Requests, swarm/Compose flags the container unhealthy, and it gets restarted. The new container starts a fresh 5-hour timer, and the loop continues forever.

This hotfix breaks the loop. 0.6.3 and 0.6.4 are now marked deprecated in the changelog.

Fixed

  • Rate-limit counter never expired. Redis.Increment reset the key's TTL on every call (INCR followed unconditionally by EXPIRE). The Dockerfile healthcheck (wget /health every 30s) kept the rl:::1 counter alive forever instead of expiring per-minute, so the counter accumulated cumulatively. After ~5 hours (600 hits ÷ 2/min), it crossed the 600 req/min threshold and /health started returning 429. Now uses an atomic Lua script that only sets the TTL when the key is created.
  • /health was wrapped by the rate limiter, CORS, and body-size middlewares. Healthchecks must never be subject to client-facing throttles. Now mounted on a separate root mux that bypasses all middleware.

Added

  • RATE_LIMIT_PER_MINUTE env var (default 600). Lower it on small deployments or raise it for high-traffic apps without rebuilding the image.

How to upgrade

docker pull ghcr.io/arkhe-systems/senddock:latest
# or pin: ghcr.io/arkhe-systems/senddock:0.6.4.1

No migration to run. No env vars required. Just redeploy.