You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While upgrading wrangler, I discovered a major performance regression I narrowed down to 4.32.0. After handling hundreds of websocket messages from mouse cursor position updates, wrangler slows to a crawl. I've attached a minimal reproduction.
Reproduce
To reproduce, open the sample in two browsers and wiggle your mouse. After ~500 events, the mouse shown in the other screen will start slowing down, becoming choppy. This seems to be because wrangler is not able to process the events quickly enough.
cf.mov
After a long time debugging this, I was able to narrow it down to this line in our wrangler.toml:
tail_consumers = [
{ service = "missing-consumer-xyz" }
]
Removing that line fixes the issue entirely in 4.32.0, as does downgrading to 4.31.0.
There was a note in the logs about sending tail events to workers that are not connected, but this wasn't displayed as an error.
Where this came from
From bisecting between 4.31.0 and 4.32.0, the issue appears to have been introduced in d304055, #10245.
$ npm run dev-bad
> multiplayer-js@1.0.0 dev-bad
> npx wrangler@4.32.0 dev
⛅️ wrangler 4.32.0 (update available 4.56.0)
─────────────────────────────────────────────
Your Worker has access to the following bindings:
Binding Resource Mode
env.MULTIPLAYER_OBJECT (multiplayerObject) Durable Object local
Your Worker is sending Tail events to the following Workers:
- missing-consumer-xyz [not connected]
Service bindings, Durable Object bindings, and Tail consumers connect to other wrangler or vite dev processes running locally, with their connection status indicated by [connected] or [not connected]. For more details, refer to https://developers.cloudflare.com/workers/runtime-apis/bindings/service-bindings/#local-development
╭──────────────────────────────────────────────────────────────────────╮
│ [b] open a browser [d] open devtools [c] clear console [x] to exit │
╰──────────────────────────────────────────────────────────────────────╯
⎔ Starting local server...
[wrangler:info] Ready on http://localhost:8787
[wrangler:info] GET /api/multiplayer 101 Switching Protocols (7ms)
[wrangler:info] GET /api/multiplayer 101 Switching Protocols (4ms)
What versions & operating system are you using?
Please provide a link to a minimal reproduction
https://github.com/danielcompton/cf-tail-consumer-repro
Describe the Bug
While upgrading wrangler, I discovered a major performance regression I narrowed down to 4.32.0. After handling hundreds of websocket messages from mouse cursor position updates, wrangler slows to a crawl. I've attached a minimal reproduction.
Reproduce
To reproduce, open the sample in two browsers and wiggle your mouse. After ~500 events, the mouse shown in the other screen will start slowing down, becoming choppy. This seems to be because wrangler is not able to process the events quickly enough.
cf.mov
After a long time debugging this, I was able to narrow it down to this line in our
wrangler.toml:Removing that line fixes the issue entirely in 4.32.0, as does downgrading to 4.31.0.
There was a note in the logs about sending tail events to workers that are not connected, but this wasn't displayed as an error.
Where this came from
From bisecting between 4.31.0 and 4.32.0, the issue appears to have been introduced in d304055, #10245.
cc @edmundhung
Please provide any relevant error logs
Note there are no errors shown in the logs here.