Repository navigation
Description
Problem
A real, already admitted sixteen-second HTTPS proxy request is reset about ten seconds after appliance shutdown starts, even when Compose is explicitly allowed thirty seconds. The container then exits successfully. Increasing the Docker stop budget alone therefore does not let this request finish during redeploy.
The controller has ten-second Caddy control/shutdown deadlines: engine.rs, shutdown implementation. The entrypoint separately allows twenty-five seconds and the web server eighteen seconds. The root Compose file does not specify stop_grace_period.
Reproduction and measured evidence
Current production tree b01ccfa5a5cdc98f80b148b8cd7906285d6a7bcb, identical to merged main b572535253f96c7b1027b563c780c80b91282a31. Tested in a new isolated appliance using Docker Desktop 4.93.0 / Engine 29.8.1 / Compose 5.5.1, Linux/amd64.
- Configure an HTTP upstream and HTTPS proxy route with an imported test certificate.
- Make the upstream hold the response for sixteen seconds. Wait until its handler confirms that Caddy's request has been admitted.
- Immediately invoke
docker compose stop --timeout 30 rentnerproxyagainst that isolated project. - Capture monotonic request/admission/stop timestamps and Docker lifecycle events.
| Explicit stop budget | HTTPS result | Approximate reset time | Container result |
|---|---|---|---|
| 10 s | ECONNRESET |
10.155 s | exit 0; Docker SIGKILL event observed near the deadline |
| 30 s | ECONNRESET |
10.185 s | exit 0; no Docker SIGKILL; no OOM |
The upstream admitted these requests within 7 ms of request start, so this was not a request queued before shutdown. The 30-second result also reproduced with a twelve-second upstream hold.
This establishes interrupted in-flight traffic, not database corruption or data loss. A separate local default-stop trace used an unexplained approximately three-second stop budget; it is excluded from the causal claim above. Docker documents a ten-second Compose default, but the controlled explicit-timeout cases are the evidence for this issue.
Expected behavior / acceptance checks
- Align the Caddy control/drain deadline, supervised process shutdown, web drain and configured container stop grace period.
- Let an admitted sixteen-second proxy request complete when the configured shutdown budget is thirty seconds, while retaining a bounded force-stop for genuinely stuck requests.
- Configure an explicit adequate
stop_grace_periodfor the supported appliance deployment and document the finite drain limit. - Add real slow/in-flight HTTP and HTTPS request assertions during stop/redeploy. Verify external responses and lifecycle events; a successful container exit alone is insufficient.
Found during final local release validation for #75; related to runtime lifecycle coverage in #12.
Activity