Fix Docker healthcheck hanging gunicorn workers
The healthcheck tried HTTPS first (curl -fsk https://...) when HTTPS was disabled. The TLS ClientHello to a plain HTTP listener hung the sync worker indefinitely. With 2 workers, both got stuck, blocking all real HTTP requests. Fix: try HTTP first, add --max-time 3 to release quickly on failure. Compose override uses HTTP-only to match HTTPS_ENABLED=false default. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
4f604ba7f8
commit
5b1ac0b741
@ -65,7 +65,7 @@ WORKDIR /app/soosef
|
|||||||
|
|
||||||
EXPOSE 35811
|
EXPOSE 35811
|
||||||
|
|
||||||
HEALTHCHECK --interval=30s --timeout=10s --start-period=15s --retries=3 \
|
HEALTHCHECK --interval=30s --timeout=5s --start-period=15s --retries=3 \
|
||||||
CMD curl -fsk https://localhost:35811/ || curl -fs http://localhost:35811/ || exit 1
|
CMD curl -fs --max-time 3 http://localhost:35811/ || curl -fsk --max-time 3 https://localhost:35811/ || exit 1
|
||||||
|
|
||||||
ENTRYPOINT ["/app/entrypoint.sh"]
|
ENTRYPOINT ["/app/entrypoint.sh"]
|
||||||
|
|||||||
@ -15,6 +15,12 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- soosef-data:/root/.soosef
|
- soosef-data:/root/.soosef
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "curl", "-fs", "--max-time", "3", "http://localhost:35811/"]
|
||||||
|
interval: 30s
|
||||||
|
timeout: 5s
|
||||||
|
start_period: 15s
|
||||||
|
retries: 3
|
||||||
deploy:
|
deploy:
|
||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user