#7583·workerd

Bug Report: subrequest analytics record timeToResponseUs as -1 on requestOutcome "unknown", so the dashboard shows 18446744000000s latency

Author: j03lCreated Sep 30, 2026Updated Sep 30, 2026

Summary

Subrequests that Workers analytics records with requestOutcome: "unknown" carry timeToResponseUs = -1. The value is stored and aggregated as an unsigned 64-bit integer, so it poisons every sum and quantile it lands in, and the dashboard's per-host subrequest latency shows 18446744000000.00s for any host where more than half the subrequests are unknown (2^64 microseconds is about 1.8447 × 10^13 seconds).

Most of our outbound requests from cron triggers come back unknown, even though every one of them returned 2xx and was fully read. So the per-host latency view is unusable for them.

What the dashboard shows

Workers & Pages, our Worker, the subrequests-by-host view, last 24 hours:

Host Status Latency shown
api.retailexpress.com.au 2xx 4k, 5xx 1 312.0ms
<store>.myshopify.com 2xx 2k 18446744000000.00s
storage.googleapis.com 2xx 51 18446744000000.00s
judge.me 2xx 20 18446744000000.00s
shopify-staged-uploads.storage.googleapis.com 2xx 3 18446744000000.00s
api.cloudflare.com 2xx 3 1.25s

The figures match timeToResponseUsP50 from workersSubrequestsAdaptiveGroups divided by 10^6 (api.cloudflare.com P50 is 1,253,817 µs). For the other four hosts the API returns a P50 of 18446744000000000000.

The -1 sentinel

Over the same 24 hours, judge.me's 20 subrequests have sum.timeToResponseUs = 18446744073709551596, which is exactly 2^64 − 20, and the 3 staged-upload subrequests sum to 2^64 − 3. All of them are requestOutcome: unknown.

Grouped per minute over 7 days (2026-09-23T03:50Z to 2026-09-30T03:50Z), 515 of the 532 unknown groups sum to exactly 2^64 − n. The other 17 hold unrelated large values (16 in LAX on 2026-09-23, for example n=9 summing to 15408456814510331342, repeated identically across four hours), and one SIN group of n=26 sums to 0. We read those as sampling weights or some other arithmetic applied on top of the sentinel, but have not confirmed it.

Which subrequests come back unknown

7 days, all colos:

Host completed unknown
api.retailexpress.com.au 3,994 0
<store>.myshopify.com 1,859 7,457
storage.googleapis.com 1 341
judge.me 218 140
shopify-staged-uploads.storage.googleapis.com 0 5
api.cloudflare.com 6 0

It does not depend on the host. It depends on which invocation made the call:

  1. Fetch-handler invocations complete. Every subrequest we can attribute to a fetch-handler invocation (our admin UI and storefront) is completed, for every host above.
  2. Cron invocations on the five-minute grid come back unknown. Every unknown Shopify subrequest is in a minute that is a multiple of 5, or in the minute after one where a long run spilled over. Besides * * * * *, we have 11 cron triggers and 10 of them fire on a multiple of 5, so each of those runs alongside our * * * * * and */5 * * * * invocations.
  3. The one trigger off the grid completes. 7,22,37,52 * * * * exists so it never shares a minute with the grid. Outside MEL (where our own admin traffic comes from), no Shopify subrequest in a grid minute completed, and none in an off-grid minute came back unknown.

Two comparisons that hold everything else constant:

  • Same code, different trigger. 7,22,37,52 * * * * and 40 3 * * * run the same function through the same Admin API client, making one GraphQL call costing 2 points. Every day this week, the 03:22 run's subrequest is completed and the 03:40 run's two are unknown. The 03:40 run takes about 1.2s, so this is not about long-running invocations.
  • Same minute, same host, different invocation type. On 2026-09-28 at 11:31 UTC, our 30 * * * * cron ran a minute late in IAD and made 49 Shopify subrequests: all unknown. In the same minute, fetch-handler requests from our admin UI in MEL made 386 subrequests to the same host: all completed.

What we could not separate

Every fetch to api.retailexpress.com.au passes signal: AbortSignal.timeout(90_000), and all 3,994 completed, including 937 in grid minutes. None of the fetches that come back unknown pass a signal. But the grid-minute Retail Express calls come from our * * * * * and */5 * * * * triggers, while the unknown calls come from the hourly and daily ones, so the signal and the trigger are confounded in our data. We also cannot tell "shares a minute with */5" apart from "three or more cron invocations running at once", because nothing in our Worker calls these hosts from a */5 run.

The pattern has been stable for the 30 days we checked, and our dev environment (a separate Worker with the same triggers) shows the same mix of completed and unknown. We have not yet built a minimal reproduction; happy to if it would help.

Expected

  1. A subrequest that completed and was fully read gets requestOutcome: completed and a real timeToResponseUs, whichever trigger started the invocation.
  2. Failing that, an unmeasured time is excluded from sums and quantiles (null rather than -1 cast to unsigned), and the dashboard does not display 2^64 microseconds as a latency.

Environment

  • Workers Paid, Wrangler 4.141.0
  • compatibility_date: 2026-09-25, compatibility_flags: ["no_nodejs_compat", "no_nodejs_compat_v2"]
  • observability.enabled: true (logs only, traces not enabled), placement.mode: smart
  • limits: { cpu_ms: 30000, subrequests: 10000 }
  • Cron triggers: * * * * *, */5 * * * *, 0 * * * *, 30 * * * *, 0 */6 * * *, 0 2 * * *, 15 2 * * *, 30 2 * * *, 15 3 * * *, 20 3 * * *, 40 3 * * *, 7,22,37,52 * * * *
  • The scheduled() handler awaits every task in sequence, with no waitUntil. Every 2xx body is read in full before the next call, except the staged-upload POST, whose 201 body is discarded

Account and script identifiers available on request.

Query used

graphql
query ($a: String!, $f: Time!, $t: Time!) {
  viewer {
    accounts(filter: { accountTag: $a }) {
      workersSubrequestsAdaptiveGroups(
        limit: 10000
        filter: { scriptName: "<script>", datetime_geq: $f, datetime_leq: $t }
        orderBy: [datetimeMinute_ASC]
      ) {
        dimensions { datetimeMinute hostname requestOutcome coloCode }
        sum { subrequests timeToResponseUs }
        quantiles { timeToResponseUsP50 }
      }
    }
  }
}