Commit 1ac1b27
Disable stubTimers in Pro Node renderer for RSC streaming
The renderer's stubTimers default of true replaces setTimeout with a
no-op inside the VM. React's RSC server renderer uses setTimeout
internally for Flight-protocol yielding, so stubbing it makes the RSC
stream open without ever emitting a chunk. The request reaches the
worker, the worker holds the accepted socket, but no data flows.
Fastify eventually closes the idle connection at keepAliveTimeout
(~72s), HTTPX retries once by its retries plugin, and Rails sees
HTTPX::Connection::HTTP2::GoawayError after ~144s.
Non-RSC SSR is unaffected because it doesn't rely on setTimeout for
its async scheduling — only RSC's streaming path hits this.
Verified by running a second renderer alongside on another port with
RENDERER_STUB_TIMERS=false: the stuck path returned a full 9.7KB RSC
payload for ServerComponentsPage in 422ms, vs. the default renderer
timing out on the same request.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 649e0bd commit 1ac1b27
1 file changed
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
44 | 50 | | |
45 | 51 | | |
46 | 52 | | |
0 commit comments