Skip to content
This repository was archived by the owner on Nov 8, 2026. It is now read-only.
This repository was archived by the owner on Nov 8, 2026. It is now read-only.

bug(runs): locate long storage RPC waits #3501

Open

Description

@justinhelmer

Goal

For a long or failed Switchboard storage RPC, identify the exact request and the observed stage where time was spent: Bot wait, Memory Worker preparation, Durable Object dispatch or construction, method work, return, or client cancellation. If the platform does not expose a stage, name the gap and retain the Cloudflare invocation reference needed for support. Do not assign a Cloudflare or application cause from a timeout alone. This is request-bound diagnosis, not a general request-waterfall or telemetry-export project.

Trigger

PR #3492's original Review timed out waiting for /runs/session/write. The exact request-bound receipt proves that six rows committed. Cloudflare logged the target SessionLogDO.write invocation as canceled after 9.911 s wall and 21 ms CPU. The current Worker logged its RPC start and the object's transaction, but did not record the new object's construction boundary or identify the long pre-method interval. The later approval call was cut. PR #3496 fixes future receipt readback for that one effect, not the latency cause.

This delay is rare but real. Cloudflare's adaptive analytics for production Memory Durable Objects during 12:00–2:00 p.m. PDT on October 26 counted about 311,431 successful invocations (wall p99 316 ms, p99.9 684 ms, maximum 13.77 s) and three client disconnects. The exact session object had 143 successful calls (maximum 1.122 s) and one 9.911 s disconnect. These values combine platform and application time and do not assign cause.

Existing and missing evidence

Boundary Existing evidence Missing for a long call
Bot to Memory storageFailure.timing, request ID and digest; cloudflare.request.sent An accepted reply or exact receipt for each effectful route when the reply is lost.
Memory Worker Authenticated receive, request decode, selected storage.rpc.progress and storage.write.progress stages A consistent RPC start/return or failure record across the /runs/* calls under investigation.
Durable Object Cloudflare invocation log with object, method, wall/CPU time and outcome; selected method stages and input-gate timers Constructor and method-stage boundaries on paths that can exceed the client deadline. Deployed Worker clocks cannot measure synchronous constructor or SQL duration reliably.
Platform dispatch Worker RPC start and object start can bound the unobserved interval Cloudflare has no proved pre-method queue receipt here. A gap remains unassigned unless a native span or provider receipt identifies it.

Acceptance

  1. Join each failing original in issue #3456 by request ID, digest, run, generation, serving build, object ID and Cloudflare invocation. Record the exact result receipt or bounded unknown. Preserve effectful writes; no blind replay.
  2. For the next long /runs/* object RPC, read caller and Worker timers, object construction and method-stage markers, plus Cloudflare wall/CPU/outcome. State which interval is long when the evidence supports it. A gap inside synchronous object work or before method entry remains unknown until provider timing divides it; a missing marker is not a cause.
  3. Keep timer fields closed and safe: operation, stage, validated IDs, object ID, incarnation, build, duration and fixed error class. No session key, thread ID, body, credential, SQL binding or arbitrary error text. A failed diagnostic sink changes no RPC result or call count.
  4. Test the actual failing-path entry points and cancellation or lost-reply behavior. Verify live correlation after an authorized deployment. Keep the current v1.310.0 production HOLD and original fix(core): identify operator context timeout stage #3492 Review custody separate.

PR #3502 adds construction and source-read boundary markers for the two Memory objects in the observed paths. It is only one diagnostic slice. The earlier broad request-waterfall proposal is withdrawn after Justin narrowed the goal; no OpenTelemetry destination or native trace setting will be changed for this issue.

Activity

  1. justinhelmer commented on Oct 27, 2026

    @justinhelmer
    ContributorAuthor

    October 26, 5:55 p.m. PDT: The complete waterfall is not yet proved. The exact #3492 Memory request joins one Worker log to one object invocation through Cloudflare trace ID 099089f91bfeb8fba01e2c7b7a343d28. An independent cold read of the proposed design found no proof that this join and retained Bot child spans work for every Bot, Memory, Resident and Sandbox path. A staging request across those paths remains an acceptance gate, not a passed check.

    Cloudflare account 3c7b28f23cc93f09e77bb0a9ffcb7e6f currently has no Workers Observability destinations at GET /accounts/{account_id}/workers/observability/destinations. A redacted native trace export therefore needs a configured destination and processor. Native Resident spans can include the runReg:<threadKey> storage key; no production trace flag was changed. Cloudflare's head sampling below one can miss a rare long call, so a full every-request trace also needs a measured 100% volume budget. The production release HOLD remains separate.

    PR #3502 is a first, narrow source slice: safe start and completion logs around synchronous Durable Object constructors. Its local public-route test passed after failing without those events, but CI, current-head Review, deployment and live timing are separate pending gates. It does not close this issue or identify the original 9.911 s wait.

  2. changed the title [-]feat(core): show a full request waterfall across runtimes[/-] [+]bug(runs): locate long storage RPC waits[/+] on Oct 27, 2026
  3. justinhelmer commented on Oct 27, 2026

    @justinhelmer
    ContributorAuthor

    The October 22 timeout burst is now localized to one long session-source read: the RunHistory input gate held for 14,194 ms while the matching SessionLogDO.read invocation took 14,385 ms wall and 9 ms CPU. Other RunHistory calls were canceled near their 10-second deadlines, some before a method ran. Exact event IDs, the cross-object join limit, and the remaining cause gap are in the incident receipt. The source target is now request-bound entry/return timing for that read plus constructor timing, so the next occurrence can separate activation from method or storage work.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions