Remote R2 bindings: all in-flight calls stall together for 10 to 20 s, then complete at the same instant

Aperta
#17,193 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
52/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
typescript

Direzione di ricerca

Start by tracing how wrangler dev --env dev handles remote R2 bindings and how their shared proxy schedules in-flight calls; the issue points to no source files or reproduction yet. Look for tests covering concurrent remote R2 reads, including range reads and null results. Done means identifying why calls across both bindings stall together and adding a regression test that verifies the reported behavior is resolved.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

What versions & operating system are you using?

wrangler 4.168.0, wrangler dev --env dev in a Linux Docker container (CI hosts in the EU), Node 24.

Please provide a link to a minimal reproduction

No minimal repro yet: the stall is rare (two bursts in about 177 hour-long CI runs). The setup: one Worker with two R2 bindings, both remote = true and jurisdiction = "eu", serving small range reads (PMTiles directory and tile ranges, at most a few hundred KB) and whole-object gets, with about 5 to 10 requests in flight.

Describe the Bug

Normally every remote R2 read finishes in 0.01 to 1.3 s (p95 of a few thousand requests per host). In two bursts of about a minute, every in-flight request through both remote R2 bindings stalls at once, then completes in groups at the same millisecond:

GET /blobs/<a>.json 200 OK (14598ms)
GET /blobs/<b>.json 200 OK (14598ms)
GET /blobs/<c>.json 200 OK (14598ms)
GET /blobs/<a>/13/4477/2827.mvt 200 OK (18089ms)
GET /blobs/<c>/13/4478/2826.mvt 200 OK (18091ms)
GET /blobs/<c>/13/4477/2826.mvt 200 OK (18090ms)
GET /bytes/<grant> 404 (18240ms)   # a plain env.BUCKET.get() returning null
GET /blobs/<b>/13/4478/2827.mvt 200 OK (22784ms)

Earlier in the same burst: five requests at 8146 ms, three at 2352 ms. Requests to both buckets, get with range, and get that returns null all stall together, which looks like head-of-line blocking in the shared remote-bindings proxy rather than slow R2. Nothing is logged: no internal error; reference =, no Network connection lost. The session recovers by itself. Other services on the same host answered normally during the burst (slowest request 1.2 s).

Expected: a slow remote call delays only itself, or fails with an error the Worker can retry.

Related, both closed: #15421, #15823.

Please provide any relevant error logs

None are emitted; the excerpt above is the request log.

Lingua principale
TypeScript
Stelle
4.7k
Fork
1.7k
Merge medio
1g 22h
PR unite (30g)
282

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di cloudflare/workers-sdk

Tutte le issue di cloudflare/workers-sdk

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.