Skip to content

Commit ad75bf2

Browse files
authored
Add timeout section to streaming wiki
1 parent ad363e1 commit ad75bf2

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

docs/how-to/suspense.md

+9
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,12 @@ function NonCriticalUI({ p }: { p: Promise<string> }) {
7575
return <h3>Non critical value {value}</h3>;
7676
}
7777
```
78+
79+
## Timeouts
80+
81+
By default, loaders and actions reject any outstanding promises after 4950ms. You can control this by exporting a `streamTimeout` numerical value from your entry.server.tsx.
82+
83+
```
84+
// Reject all pending promises from handler functions after 10 seconds
85+
export const streamTimeout = 10_000;
86+
```

0 commit comments

Comments
 (0)