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

Open
#17,193 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
52/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
typescript

Research direction

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.

Written by the indexing model from the issue text.

Description

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.

Dominant language
TypeScript
Stars
4.7k
Forks
1.7k
Avg merge
1d 22h
Merged PRs (30d)
282

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from cloudflare/workers-sdk

All issues in cloudflare/workers-sdk

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.