Skip to content

Evaluate safe retries for retryable Connect Durable Object dispatch failures #2065

Closed

Description

@jshph

Context

Production incident follow-up from #2064.

At 2026-08-20 18:23 UTC, a healthy local BB lost its public tunnel. The replacement /__tunnel?v=1 request received HTTP 500 during reported Cloudflare Durable Objects errors. The exact exception cannot be recovered because the historical client log retained neither a Ray ID nor a response body, and local Cloudflare credentials/Workers observability access were unavailable.

There is no intentional application 500 on this route. The remaining plausible server-side paths are:

  • fresh D1 label resolution;
  • Durable Object binding or stub.fetch() dispatch;
  • Durable Object constructor state restoration;
  • a storage/output-gate failure while accepting the replacement socket;
  • a Cloudflare-generated internal error.

Stale tunnel ownership is not a rejection path: replacement closes tagged predecessors defensively and then accepts the new socket.

Follow-up

After #2064 provides request-correlated structured events:

  1. Capture the failure stage plus Cloudflare remote, retryable, and overloaded flags for any recurrence.
  2. Determine whether retryable, non-overloaded Durable Object dispatch failures should receive a small bounded Worker-side retry using a fresh stub, as recommended by Cloudflare.
  3. Do not immediately retry overload errors; preserve platform backpressure.
  4. Add a regression that injects the confirmed failure shape and proves there is no concurrent duplicate tunnel admission.
  5. Revisit the Durable Object constructor and pending storage writes only if the correlated event identifies them; avoid a speculative lifecycle change.

Cloudflare references:

AGENT GENERATED: by GPT-5

Activity

  1. added theissue type on Aug 21, 2026
  2. added
    remote
    connect
    on Aug 21, 2026
  3. salemsayed commented on Sep 24, 2026

    @salemsayed
    Contributor

    Production recurrence from a Linux bb Nightly desktop server (0.43.5-nightly.35773768107.1) on 2026-09-24. The local server stayed up on 127.0.0.1:38886; its process started 2026-09-23 05:29 UTC and was still the same PID after the incident. A local GET / returned HTTP 200. The iPad using bb Connect could not reach it during the longer episode.

    Server log timestamps below are UTC. The hostname and thread IDs are omitted:

    2026-09-24T01:31:09Z tunnel closed (code 1006); reconnecting in 1000ms
    2026-09-24T01:31:17Z tunnel rejected: HTTP 500; reconnecting in 2000ms
    2026-09-24T01:31:24Z tunnel rejected: HTTP 500; reconnecting in 4000ms
    2026-09-24T01:31:29Z tunnel rejected: HTTP 500; reconnecting in 8000ms
    2026-09-24T01:31:44Z tunnel rejected: HTTP 500; reconnecting in 16000ms
    2026-09-24T01:32:06Z tunnel rejected: HTTP 500; reconnecting in 30000ms
    2026-09-24T01:32:36Z tunnel connected
    
    2026-09-24T14:35:09Z tunnel closed (code 1006); reconnecting in 1000ms
    2026-09-24T14:35:14Z tunnel rejected: HTTP 500; reconnecting in 2000ms
    2026-09-24T14:35:21Z tunnel rejected: HTTP 500; reconnecting in 4000ms
    2026-09-24T14:35:27Z tunnel rejected: HTTP 500; reconnecting in 8000ms
    2026-09-24T14:35:40Z tunnel rejected: HTTP 500; reconnecting in 16000ms
    2026-09-24T14:36:01Z tunnel rejected: HTTP 500; reconnecting in 30000ms
    2026-09-24T14:36:36Z tunnel rejected: HTTP 500; reconnecting in 30000ms
    2026-09-24T14:37:10Z tunnel rejected: HTTP 500; reconnecting in 30000ms
    2026-09-24T14:37:42Z tunnel rejected: HTTP 500; reconnecting in 30000ms
    2026-09-24T14:38:16Z tunnel rejected: HTTP 500; reconnecting in 30000ms
    2026-09-24T14:38:51Z tunnel rejected: HTTP 500; reconnecting in 30000ms
    2026-09-24T14:39:27Z tunnel rejected: HTTP 500; reconnecting in 30000ms
    2026-09-24T14:40:02Z tunnel rejected: HTTP 500; reconnecting in 30000ms
    2026-09-24T14:40:37Z tunnel rejected: HTTP 500; reconnecting in 30000ms
    2026-09-24T14:41:12Z tunnel rejected: HTTP 500; reconnecting in 30000ms
    2026-09-24T14:41:43Z tunnel connected
    

    The client did keep retrying, so this is not the old no-retry defect. After reconnect, bb Connect thread loads returned HTTP 200. The local router's per-WAN probes at 14:35 and 14:41 UTC reported 3/3 successful HTTPS targets on all three links, with no WAN handover recorded. This does not prove there was no packet loss, but does not support a WAN failover explanation for the sustained HTTP 500 responses.

    No Cloudflare Ray ID, x-bb-request-id, or 500 response body is present in this client version's logs. Could a maintainer correlate the 01:31 and 14:35-14:41 UTC windows with the Connect Worker, D1, and Durable Object logs to identify which admission stage returned 500? I have not established a server-side cause.

    AGENT GENERATED

  4. ymichael commented on Oct 8, 2026

    @ymichael
    Collaborator

    Fixed by #4313: the gate now retries GET/HEAD dispatches with a fresh stub on retryable, non-overload errors, as proposed here.

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

    connectremote

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions