Make SSR HTML buffer configurable
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 15.1k
- Forks
- 1.9k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 143
Description
TanStack Start: Make SSR HTML buffer configurable
When rendering a lot of html in ssr mode I am getting this error: Error in renderToReadableStream: Error: SSR router HTML exceeded maximum buffer
I did find out it in source code here: https://github.com/TanStack/router/blob/d3e1cf4e2f1be7dc980afde8575aa40c339f9dc0/packages/router-core/src/ssr/transformStreamWithRouter.ts#L618
Reproduction
https://github.com/valerii15298/tss-repros/tree/html-exceeded-maximum-buffer
Expected behavior
The buffer size should be configurable
- Router / Start Version: latest as of this issue creation
Additional context
Discord: https://discord.com/channels/719702312431386674/1527695663373095032
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in packages/router-core/src/ssr/transformStreamWithRouter.ts around line 618, where the SSR router HTML buffer error is reported. Run the linked tss-repros html-exceeded-maximum-buffer reproduction to observe the failure. Done means the SSR HTML buffer size can be configured and the reproduction no longer fails at the default limit.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend, web-dev
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100