-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Description
Which project does this relate to?
Start
Describe the bug
When a TanStack Start application is put under load, its memory usage grows linearly with each request that involves SSR streaming of a component. This eventually leads to performance degradation, connection errors, and server crashes.
The issue seems specific to SSR-rendered pages. Pure API routes (e.g., a GET handler returning a simple response) do not exhibit the same memory growth. We have been able to reproduce this behavior on the Bun runtime.
Your Example Website or App
https://github.com/TanStack/router/tree/main/examples/react/start-bun
Steps to Reproduce the Bug or Issue
cd start-bun
bun install
bun run build && bun run start
oha "http://localhost:3000/" -c 100 -n 10000
While the test is running, observe the server's memory usage using a tool like htop or your system's activity monitor.
Expected behavior
The server's memory usage should remain stable and relatively low throughout the load test. The test should complete with a very high success rate (>99%) and minimal connection errors.
Screenshots or Videos
Screencast_20250928_223925.mp4
Platform
- Router / Start Version: Start: 1.132.24; Router: 1.132.23
- OS: Linux
- Browser: Chrome
- Browser Version: 140
- Bundler: vite
- Bundler Version: 7.1.7
Additional context
No response