#7376 D1 Platform Proxy Socket Closed (Probably Due To Timeout)
PR #11231 (miniflare 4.20251109.1) fixed proxy timeout issues by disabling Node.js HTTP timeouts. Symptom matches but fix targeted WebSocket connections specifically. Major version gap (3.91.0 → 4.60.0).
Ask reporter to verify with latest wrangler 4.60.0 and provide minimal reproduction if still occurring.
Analysis Report
Issue Review: cloudflare/workers-sdk#7376
Summary
D1 Platform Proxy socket closes automatically after idle period when using getPlatformProxy(), causing "other side closed" errors.
Findings
- Created: 2024-11-27
- Updated: 2025-10-30
- Version: 3.91.0 (Wrangler) -> 4.60.0 (current)
- Component: D1, Miniflare (getPlatformProxy)
- Labels: bug, d1
- Comments: 1 (reporter's own workaround)
Key Evidence
Significant version gap: Issue reported against Wrangler 3.91.0, current is 4.60.0 (major version upgrade)
Related fix merged: PR #11231 "[miniflare] Fix WebSocket proxy timeout by disabling Node.js HTTP timeouts" was merged on 2025-11-12 and released in miniflare 4.20251109.1. This fix:
- Addresses Node.js HTTP timeouts (60-90 seconds) on the dev registry proxy server
- Sets
headersTimeout: 0andrequestTimeout: 0to disable timeout enforcement - Allows connections to remain open indefinitely
Symptom match: The error in the issue (
SocketError: other side closed) comes from undici/miniflare's proxy client after a period of inactivity, which aligns with the timeout behavior described in PR #11231.Reporter found workaround: The reporter discovered that re-initializing the drizzle connection after long computations worked around the issue.
No minimal reproduction provided: The issue lacks a reproducible test case, making verification difficult.
Recommendation
Status: NEEDS VERIFICATION
Reasoning: PR #11231 (merged Nov 2025) directly addresses proxy timeout issues caused by Node.js HTTP timeouts, which matches the symptoms described in this issue. However, PR #11231 specifically mentions WebSocket connections in the dev registry proxy, while this issue is about D1 bindings via getPlatformProxy(). The underlying mechanism (HTTP timeouts on proxy connections) could be the same, but without a minimal reproduction, we cannot confirm the fix resolves this specific case.
Action: Ask the reporter to verify if the issue is resolved in the latest version (Wrangler 4.60.0 / Miniflare 4.20260120.0).
Suggested Comment
Hi @naourass, thank you for reporting this issue!
Since this was reported, there have been significant changes to how Miniflare handles proxy connections. Specifically, PR #11231 (released in miniflare 4.20251109.1) fixed WebSocket proxy timeouts by disabling Node.js HTTP timeouts that were causing connections to close after 60-90 seconds of inactivity.
Could you please test with the latest version of Wrangler (4.60.0) and let us know if you're still experiencing this issue? If so, a minimal reproduction would be very helpful for further investigation.
If we don't hear back within 30 days, we may close this issue assuming the problem has been resolved.
Notes & Feedback (0)
No notes yet.