#11082 Fallback service failed to fetch module; Connection refused
Maintainer-confirmed bug. Intermittent vitest-pool-workers failure when running tests repeatedly with large bundles. On backlog with reproduction provided.
No action - confirmed bug on backlog with workaround (singleWorker flag).
Analysis Report
Issue Review: cloudflare/workers-sdk#11082
Summary
vitest-pool-workers intermittently fails with "Fallback service failed to fetch module; Connection refused" when running tests multiple times in succession with large bundles and multiple test files.
Findings
- Created: 2025-10-24
- Updated: 2025-11-26
- Version: @cloudflare/vitest-pool-workers 0.8.71 -> 0.12.6
- Component: vitest-pool-workers
- Labels: bug, vitest
- Comments: 2
Key Evidence
- Maintainer @petebacondarwin confirmed reproducibility on 2025-10-27: "Thanks for the great reproduction! I can see this happening locally too. Adding to the backlog to be looked into."
- This issue reopens #8853, which was closed due to lack of reproduction
- Related issue #7569 was closed with reference to this new issue
- A workaround exists:
poolOptions.workers.singleWorker = trueflag - No PRs have been merged explicitly fixing this issue
- No changelog entries mention fixing this connection refused/fallback service issue
- Reproduction repository provided: https://github.com/dmaretskyi/vpw-repro
Root Cause Analysis
The error appears to be related to resource exhaustion when running vitest-pool-workers repeatedly. Key factors:
- Running tests multiple times in quick succession
- Having multiple separate test-suite files
- Having workers with large bundle sizes (large dependencies like
effect)
The error message connect(): Can't assign requested address and Connection refused suggest port exhaustion or timing issues with workerd's fallback service module resolution.
Recommendation
Status: KEEP OPEN
Reasoning: This is a confirmed, reproducible bug that a maintainer has added to the backlog. No fix has been merged yet, and the reproduction is clear. The issue is actively tracked.
Action: No action needed - wait for fix to be developed. Consider subscribing for updates.
Suggested Comment
N/A - Issue is confirmed and on backlog, no further action needed at this time.
Notes & Feedback (0)
No notes yet.