From f1270b4e6c5d6bb530380814be5217926b9a4742 Mon Sep 17 00:00:00 2001 From: lrnselfreliance <33263708+lrnselfreliance@users.noreply.github.com> Date: Tue, 1 Sep 2026 20:08:51 -0600 Subject: [PATCH] archive: raise archive service request limit to 500MB (#692) Uploaded singlefiles are base64-encoded into JSON before being sent to the archive container, so an 88MB upload becomes a ~118MB request. Sanic's default REQUEST_MAX_SIZE of 100MB rejected it with a 413 before the handler ran, and the API surfaced this as KeyError: 'singlefile'. Only the Docker deployment is affected; Debian/RPi extract in-process. Co-authored-by: Claude Fable 5.1 --- docker/archive/main.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docker/archive/main.py b/docker/archive/main.py index 0541ebb3..18bb48aa 100644 --- a/docker/archive/main.py +++ b/docker/archive/main.py @@ -76,8 +76,12 @@ if not BROWSER_EXEC.is_file(): # Increase response timeout, archiving can take several minutes. RESPONSE_TIMEOUT = 10 * 60 +# The API sends uploaded singlefiles base64-encoded in JSON (a 33% size increase). Sanic's default +# 100MB limit rejects large uploads with a 413 before the handler runs. +REQUEST_MAX_SIZE = 500 * 1024 * 1024 config = { 'RESPONSE_TIMEOUT': RESPONSE_TIMEOUT, + 'REQUEST_MAX_SIZE': REQUEST_MAX_SIZE, } app = Sanic('archive')