Workers SDK Issue Reports

← Back to Dashboard

#11006 WebSocket Client Connection Hangs

Recommendation:NEEDS VERIFICATION
Difficulty:n/a
Reasoning:

Fix for WebSocket proxy timeout merged in PR #11231 (miniflare 4.20251109.1). Reporter's issue started ~Oct 6, which matches related workerd#5292 timeline. Fix available for 2+ months.

Suggested Action:

Ask reporter to verify fix with latest wrangler version (4.60.0+)

Analysis Report

Issue Review: cloudflare/workers-sdk#11006

Summary

WebSocket client connections hang indefinitely in Cloudflare Workers during local development when connecting to certain endpoints (Kusama Asset Hub), while others work fine (Polkadot Asset Hub).

Findings

  • Created: 2025-10-17
  • Updated: 2025-10-17
  • Version: wrangler@^4.42.2 → wrangler@4.60.0 (current)
  • Component: miniflare (WebSocket proxy)
  • Labels: bug
  • Comments: 0

Key Evidence

  1. Root Cause Identified: PR #11231 "[miniflare] Fix WebSocket proxy timeout by disabling Node.js HTTP timeouts" was merged on 2025-11-12. The PR description states:

    "The dev registry proxy server was experiencing connection timeouts around 60-90 seconds for long-lived WebSocket connections. This was caused by Node.js's headersTimeout (defaults to min(60s, requestTimeout)) which is checked periodically by connectionsCheckingInterval (defaults to 30s)."

  2. Timeline Matches: The reporter states "This code has been working fine for years, but suddenly started hanging around October 6th, 2025." A related workerd issue (#5292) with the same reproduction timing was also fixed by this PR.

  3. Fix Released: The fix was included in miniflare 4.20251109.1 (released ~November 13, 2025). Current version is 4.20260120.0 - the fix has been available for 2+ months.

  4. Changelog Entry (miniflare 4.20251109.1):

    Fix WebSocket proxy timeout by disabling Node.js HTTP timeouts

    The dev registry proxy server was experiencing connection timeouts around 60-90 seconds for long-lived WebSocket connections... Setting both headersTimeout: 0 and requestTimeout: 0 in createServer options disables timeout enforcement, allowing WebSocket connections to remain open indefinitely as needed.

  5. Related Issue Closed: The related workerd issue (#5292) "Proxying websocket leads to Received fragmented control frame error" was automatically closed when PR #11231 merged.

Recommendation

Status: NEEDS VERIFICATION

Reasoning: A fix for WebSocket proxy timeout issues was merged in miniflare 4.20251109.1, which addresses the exact symptoms reported (WebSocket connections hanging during local development). The timeline of the regression (around October 6th) matches the related workerd issue. However, the reporter has not confirmed the fix resolves their specific issue with Kusama Asset Hub endpoints.

Action: Comment on the issue asking the reporter to verify if updating to wrangler@4.60.0 (or any version >= 4.13.0 which includes miniflare 4.20251109.1+) resolves their issue.

Suggested Comment

Hi @preschian, thank you for reporting this issue!

We believe this may have been fixed in PR #11231, which was released in miniflare 4.20251109.1 (wrangler 4.13.0+). The fix addressed WebSocket proxy timeout issues in local development where Node.js HTTP timeouts were causing long-lived WebSocket connections to hang.

Could you please try updating to the latest version of wrangler (npm install wrangler@latest) and verify if the issue is resolved?

cd test-workers-assethub-kusama
npm install wrangler@latest
bun run dev
# Then test: curl http://localhost:8787/kusama

If the issue persists with the latest version, please let us know and we'll investigate further. Thanks!

Notes & Feedback (0)

No notes yet.

Add Note