diff --git a/docs/configuration.md b/docs/configuration.md index 325f65fb..2c47b534 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -243,13 +243,13 @@ Defaults to 15. ### controller.transfer_min_speed -Speed in KiB/s a request to the controller has to move at, measured over 30 seconds, requests moving slower are closed. +Speed in KiB/s a request to the controller has to move at, measured over 60 seconds, requests moving slower are closed. This closes uploads and downloads that have stalled or are sent too slowly to ever finish, while there is no limit on how long a transfer making progress can take. It applies to saves, mods and exports uploaded to the controller, proxy streams through it, and the body of any other request. Time spent waiting for a proxy stream to start is not counted, see controller.proxy_stream_timeout. Setting it lower than the default is not recommended. Downloads through a proxy stream are measured on what the controller has handed to the OS. -The OS can buffer a couple of MiB per connection and only accepts more once a large part of that has been sent, so at lower values a download that keeps moving can go 30 seconds without the controller passing anything on and be closed. +The OS can buffer a couple of MiB per connection and only accepts more once a large part of that has been sent, so at lower values a download that keeps moving can go 60 seconds without the controller passing anything on and be closed. Set to 0 for no limit. Must be 0 or greater. diff --git a/packages/controller/src/routes.ts b/packages/controller/src/routes.ts index 6670e4de..eb4415c7 100644 --- a/packages/controller/src/routes.ts +++ b/packages/controller/src/routes.ts @@ -857,7 +857,7 @@ async function uploadMod(req: Request, res: Response) { } -export function addRouteHandlers(app: Application, progressCheckIntervalMs = 30_000) { +export function addRouteHandlers(app: Application, progressCheckIntervalMs = 60_000) { app.use(guardRequest(progressCheckIntervalMs)); app.get("/metrics", validateUserToken, diff --git a/packages/lib/src/config/definitions.ts b/packages/lib/src/config/definitions.ts index 299ea628..94419d24 100644 --- a/packages/lib/src/config/definitions.ts +++ b/packages/lib/src/config/definitions.ts @@ -234,7 +234,7 @@ export class ControllerConfig extends classes.Config { }, "controller.transfer_min_speed": { title: "Transfer Minimum Speed", - description: "KiB/s an upload or download has to move at over 30 seconds to not be closed, 0 for no limit.", + description: "KiB/s an upload or download has to move at over 60 seconds to not be closed, 0 for no limit.", type: "number", initialValue: 64, validator: validators.greaterThanEqualZero,