#10814 TypeError: memory limit has been exceeded with inline data: URL
Confirmed reproducible bug. HTMLRewriter memory limit hit when serving HTML with large inline data URLs. Wrangler dev server uses HTMLRewriter internally for live reload injection. Also affects production workers.
Keep open - valid low-priority bug with known root cause and maintainer acknowledgment.
Analysis Report
Issue Review: cloudflare/workers-sdk#10814
Summary
HTMLRewriter memory limit error when serving HTML with large (>10MB) inline data: URLs, caused by Wrangler's dev server injecting live reload scripts.
Findings
- Created: 2025-09-29
- Updated: 2025-10-06
- Version: wrangler@4.40.2 (tested) → 4.60.0 (current)
- Component: wrangler (dev server), HTMLRewriter
- Labels: bug
- Comments: 2
Key Evidence
- Confirmed reproducible by maintainer @edmundhung on 2025-10-06
- Root cause identified: Wrangler's dev server uses HTMLRewriter under the hood to inject live reload scripts into HTML responses (ProxyWorker.ts:252), even when user code doesn't use HTMLRewriter
- Upstream investigation: Related workerd issue #2998 confirmed that workerd itself handles large data URLs correctly - the bug is specific to Wrangler's ProxyWorker implementation
- Real-world impact: Affects Python Notebooks with inline data images (common use case documented in readthedocs/readthedocs.org#11693)
- Maintainer response: "It's possible to raise the memory limit, but properly handling very large elements would need more involved changes to the implementation"
- No fixes found: No merged PRs or changelog entries reference this issue
- Also affects production: Reporter states this occurs in production Cloudflare workers, not just dev server
Recommendation
Status: KEEP OPEN
Reasoning: This is a confirmed, reproducible bug with an identified root cause. A maintainer has acknowledged the issue and explained why it occurs (HTMLRewriter memory limits in Wrangler's ProxyWorker). The bug affects real users serving Jupyter notebooks and similar content with large inline data URLs. While deprioritized due to being "rare", the issue has a clear technical path to resolution (raising HTMLRewriter memory limits or bypassing HTML rewriting for large responses).
Action: Keep open as a valid low-priority bug. No further action required at this time.
Notes & Feedback (0)
No notes yet.