Skip to content

bug(scale): concurrent Caddy configuration updates reset proxy traffic #171

Closed

Description

@RentnerKev

Status reconciliation — 12 November 2026: original product regression resolved by the reviewed downstream Caddy backport.

The earlier statement that no Caddy patch is shipped is historical. #347 introduced the reviewed reload-lifetime fix; #376 rebased and verified it for Caddy 2.11.9. Current main 8ac0e3ca ships that checksum-gated source replacement in its actual Caddy build.

Closure evidence and limits

Close the original RentnerProxy runtime regression as completed on the shipped patched build. This does not claim stock/unmodified upstream Caddy 2.11.9 fixes the bug, does not authorize dropping the backport, and does not erase the earlier reproductions. Future Caddy upgrades must revalidate/rebase the patch or demonstrate equivalent upstream behavior before removing it; traffic assertions remain strict.

No new runtime test was started for this status audit. The evidence above is existing merged-PR and current-main execution evidence. No new upstream Caddy comment, ping or cross-link was published.

The repository's older contributing note still describes the Beta-1/Beta-2 known limitation; it is historical documentation, not a new failed runtime measurement. No extra documentation commit is included in this issue-only task.

Original issue body and historical findings (superseded current-status statements preserved as history)

Current findings (2026-10-04): the reset also reproduces with Caddy running alone, without the controller, database, or upstream. A Linux container-local control reproduces it too, so Windows published-port forwarding is not a required cause. Caddy process identity stays stable.

Unchanged Caddy 2.11.3, 2.11.4, 2.11.6, and 2.11.7 all reproduced resets during routing reloads. The rollback to 2.11.3 therefore does not establish a fix. No Caddy core patch or unproven downgrade is being shipped.

The missing original route index and invalid-response evidence are preserved by merged PR #173 and its follow-up on main. The acceptance workload still rejects connection resets, with its existing concurrency, round count, and response assertions. This diagnostic improvement does not resolve the runtime failure; this issue remains open.

Detailed investigation and version results.

Caddy 2.11.7 verification: the official unchanged release binary also reproduces the failure, including a container-local Linux control. Measured results. This version does not resolve the reproduced reload reset.

Original report:

Two unchanged local Windows Docker scale runs on merged main 6d97bb5b51ef351d65109fd4b008f7b58e45004d fail in concurrent round 1 with a host-side Bun fetch() ECONNRESET, before any HTTP response is received. Linux Runtime Scale CI on PR #166's refreshed head passes, so this report does not claim a universal routing failure or a proven libc regression.

Reproduction, from a clean LF export of the revision, Bun 1.4.2 on Windows with Docker Desktop:

bun --no-env-file --no-orphans scripts/runtime-scale/run.ts --hosts 100 --concurrency 4 --rounds 3 --seed 70 --timeout-seconds 600 --report scale-report.json

No limits, assertions, client connection options or timeouts were changed. Exactly one second run was made to reproduce the initial failure; both original reports are retained.

Observed:

  • First run: exit 1 after 35.01 seconds; image sha256:505663d9a465d4d1d5876a037246860f25d116232b38cc8b28acb9f34fc8fcd2.
  • Second run: exit 1 after 34.62 seconds; image sha256:2b2dabf2f8ba60f2ab934d2dfed42f28acbd95e1e7c62a0456e2e3025b137798.
  • Both reach the 25-host and 100-host phases, then fail in concurrent round 1 at harness.ts:343, in the initial fetch() rather than response-body reading.
  • Both reports have summary.passed=false. All three early resource measurements pass. There are zero final samples and insufficient trend evidence because the run aborts; this is not proof of resource exhaustion.
  • Sanitized failure diagnostics are identical:
{"stage":"concurrent","failureCategory":"unexpected","observation":{"route":null,"status":null,"hostFetchCode":"ECONNRESET"},"caddy":[],"fixtureReachability":{"primary":200,"secondary":200,"auth":200,"tls":200},"fixtureRunning":true,"capture":"complete"}
  • Both runs' disposable containers, networks, volumes and images were fully cleaned up. Existing user services/data were untouched.

Expected: complete the original bounded scale workload. Concurrent requests already permit HTTP 200 or 404 while hosts are changed; a connection reset remains a failure.
Actual: Windows-host HTTP traffic to the published Caddy port resets during concurrent configuration changes.

Relevant code:

Root cause remains open. Healthy fixture probes show post-failure internal reachability, not the state of Windows -> Docker port forwarding -> Caddy at the failure instant. No matching categorized Caddy transport error was captured; this does not establish that the affected request reached Caddy.

Suggested investigation: pass the route index in the concurrent GETs (currently missing, hence route:null), capture request time, Caddy PID/restart state and host-port reachability at failure, then compare one explicitly separate diagnostic run with client connection reuse disabled. Distinguish configuration reload, process lifecycle, Docker forwarding and client reuse. Retain the unchanged acceptance workload; do not suppress ECONNRESET with blanket retries or attribute it to upstream dialing without evidence.

Activity

  1. added
    bug
    area: proxy
    area: runtime
    area: docker
    area: ci
    on Oct 4, 2026
  2. RentnerKev commented on Oct 4, 2026

    @RentnerKev
    MemberAuthor

    Investigation update: the reset reproduces with Caddy running by itself, without the controller, database, or proxy upstream. Process identity remains stable; this is not a Caddy restart.

    Unchanged upstream versions all reproduced ECONNRESET during 50 acknowledged routing reloads with four fresh Bun workers and no request retries: 2.11.3 had 13/8,300 requests fail, 2.11.4 had 11/8,244 fail, and 2.11.6 had 8/8,304 fail. These are sequential reproduction measurements, not comparative error-rate estimates. A Linux container-local request control also reproduced the failure, so Windows/Docker published-port forwarding is not a required cause.

    A rollback to 2.11.3 was built with the existing pinned HTTP-only CrowdSec module and its actual binary version verified. It did not remove the failure. The CrowdSec module's go.mod requires Caddy 2.11.3, so selecting an older Caddy version without changing module compatibility can silently select a newer core through Go's module resolution.

    Caddy will remain unmodified as requested. The scale fixture retains its original request behavior, concurrency, round count, and response assertions. The separate diagnostic PR preserves the original failed route index and invalid-response evidence; it does not close this issue. No proven unaffected compatible upstream version has been identified yet.

  3. changed the title [-]bug(scale): Windows concurrent configuration updates reset proxy traffic[/-] [+]bug(scale): concurrent Caddy configuration updates reset proxy traffic[/+] on Oct 4, 2026
  4. RentnerKev commented on Oct 4, 2026

    @RentnerKev
    MemberAuthor

    Caddy 2.11.7 verification (2026-10-04): the unchanged official release binary still reproduces the plain HTTP/1.1 reset during routing reloads.

    The official Linux amd64 release archive was verified against its GitHub release API SHA-256 (727b91701a392de6ebc5027509f548bf39979e5216340d0faed8fa5e69c84f8b). Actual binary version: v2.11.7 h1:yj0Y4fYZGPkSvibBJ1sTWE33xC0fxztVyXEW5iIdUT4=. The fixture runs only Caddy with a static HTTP 200 response, with no core patch, CrowdSec module, RentnerProxy app, controller, database, or upstream.

    Client Concurrent worker requests HTTP 200 successes ECONNRESET
    Windows Bun 1.4.2, keepalive:false 8,570 8,555 15
    Windows Node 26.7.0, strict pooled node:http 3,798 3,714 84
    Linux Bun 1.4.2, container-local loopback, keepalive:false + Connection:close 6,834 6,833 1

    Each sequential run uses four workers overlapping 50 acknowledged distinct config loads, followed by ten successful warmed-request/load-ack/request barriers. PID stays stable and all three containers were removed. There are no script-level request retries. Each run lasted approximately 18 seconds. The Linux concurrent requests bypass Windows and Docker published-port forwarding; its additional barriers remain host-side and are excluded from worker request counts. These measurements establish reproduction, not comparable failure rates.

    The 2.11.7 release notes fix HTTP/2 and streaming regressions from 2.11.6. They do not establish a fix for this separately reproduced reload case. #171 remains open. The exact faulty Caddy/Go/kernel path and TCP-reset emitter remain unconfirmed.

    The official caddy:2.11.7 and caddy:2.11.7-builder manifests were unavailable at test time. This isolated diagnostic image uses the pinned official 2.11.6 runtime filesystem with its binary replaced by the verified official 2.11.7 archive, plus the test clients. Tracked production code and the acceptance workload remain unchanged; no full application scale suite or long soak run was started for this version check.

  5. added this to the v1.0.0-beta.1 milestone on Oct 10, 2026
  6. RentnerKev commented on Oct 10, 2026

    @RentnerKev
    MemberAuthor

    This is the final blocker for Beta 1: we're waiting for an upstream Caddy release that includes my fix. Once it's available, we'll update Caddy and rerun the affected tests.

  7. RentnerKev commented on Oct 15, 2026

    @RentnerKev
    MemberAuthor

    Deferred to v1.0.0-beta.2. Beta 1 ships with this known connection-reset limitation; the issue remains open until a fix is validated.

  8. removed this from the v1.0.0-beta.2 milestone on Oct 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: ciarea: dockerarea: proxyarea: runtimebug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions