diff --git a/docs/changelogs/v0.40.md b/docs/changelogs/v0.40.md index 49affeaff..f45fa30a1 100644 --- a/docs/changelogs/v0.40.md +++ b/docs/changelogs/v0.40.md @@ -100,9 +100,10 @@ Previously, provide operations could start before the Accelerated DHT Client dis #### ⏱️ Configurable gateway request duration limit -The new [`Gateway.MaxRequestDuration`](https://github.com/ipfs/kubo/blob/master/docs/config.md#gatewaymaxrequestduration) configuration option sets an absolute deadline for gateway requests. Unlike `RetrievalTimeout` (which resets on each data write and catches stalled transfers), this is a hard limit on the total time a request can take. +[`Gateway.MaxRequestDuration`](https://github.com/ipfs/kubo/blob/master/docs/config.md#gatewaymaxrequestduration) sets an absolute deadline for gateway requests. Unlike `RetrievalTimeout` (which resets on each data write and catches stalled transfers), this is a hard limit on the total time a request can take. + +The default 1 hour limit (previously hardcoded) can now be adjusted to fit your deployment needs. This is a fallback that prevents requests from hanging indefinitely when subsystem timeouts are misconfigured or fail to trigger. Returns 504 Gateway Timeout when exceeded. -The default 1 hour limit (previously hardcoded) can now be adjusted to fit your deployment needs. This protects the gateway from edge cases and slow client attacks, returning 504 Gateway Timeout when exceeded. #### 🔧 Recovery from corrupted MFS root If your daemon fails to start because the MFS root is not a directory (due to misconfiguration, operational error, or disk corruption), you can now recover without deleting and recreating your repository in a new `IPFS_PATH`. diff --git a/docs/gateway.md b/docs/gateway.md index d51eab4cc..31b753e51 100644 --- a/docs/gateway.md +++ b/docs/gateway.md @@ -109,7 +109,9 @@ When deploying Kubo's gateway in production, be aware of these important conside > [!IMPORTANT] > **Timeouts:** Configure [`Gateway.RetrievalTimeout`](config.md#gatewayretrievaltimeout) -> based on your expected content retrieval times. +> to terminate stalled transfers (resets on each data write, catches unresponsive operations), +> and [`Gateway.MaxRequestDuration`](config.md#gatewaymaxrequestduration) as a fallback +> deadline (default: 1 hour, catches cases when other timeouts are misconfigured or fail to fire). > [!IMPORTANT] > **Rate Limiting:** Use [`Gateway.MaxConcurrentRequests`](config.md#gatewaymaxconcurrentrequests)