From 932438847e7310fc0cbd493efb990f664b1ea70e Mon Sep 17 00:00:00 2001 From: f Date: Thu, 29 Oct 2026 11:57:55 -0300 Subject: [PATCH 1/5] fix: make sure we don't set an upload limit --- compose.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/compose.yml b/compose.yml index ba59129..761877e 100644 --- a/compose.yml +++ b/compose.yml @@ -35,6 +35,7 @@ services: - "backupbot.backup=true" - "backupbot.backup.pre-hook=/garage meta snapshot --all" - "backupbot.backup.path=/var/lib/garage/meta/snapshots/,/var/lib/garage/meta/cluster_layout,/var/lib/garage/meta/data_layout,/var/lib/garage/meta/node_key,/var/lib/garage/meta/node_key.pub" + - "traefik.http.middlewares.${STACK_NAME}-buffering.buffering.maxRequestBodyBytes=0" volumes: - "${LOCAL_FOLDER_META:-meta}:/var/lib/garage/meta" - "${LOCAL_FOLDER_DATA:-data}:/var/lib/garage/data" -- 2.54.0 From 8910018d47cb753b73725065ec797724b09a1377 Mon Sep 17 00:00:00 2001 From: f Date: Thu, 29 Oct 2026 12:02:49 -0300 Subject: [PATCH 2/5] doc: note about upload limits --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index a597439..f85692b 100644 --- a/README.md +++ b/README.md @@ -116,3 +116,9 @@ If you're running Garage in a cluster, when you restore the metadata, other node * Re-deploy Garage: `abra app undeploy -n && sleep 5 && abra app deploy -n ` For more, see [`garagehq.deuxfleurs.fr`](https://garagehq.deuxfleurs.fr/documentation/cookbook/real-world/). + +## Upload limits + +To prevent "499 Client Closed Request" errors you should make sure you +`READ_TIMEOUT` and `WRITE_TIMEOUT` variables on Traefik are high enough. +Same on the proxy if you're reverse-proxying Traefik. -- 2.54.0 From a826717ef3939d69fcd6d50817ab9784f90019b4 Mon Sep 17 00:00:00 2001 From: f Date: Thu, 29 Oct 2026 17:06:10 -0300 Subject: [PATCH 3/5] feat: limit uploaded chunk size --- .env.sample | 4 ++++ README.md | 6 ++++++ compose.yml | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.env.sample b/.env.sample index d3d4a9c..f47f501 100644 --- a/.env.sample +++ b/.env.sample @@ -23,6 +23,10 @@ DATA_FSYNC=false DISABLE_SCRUB=false BLOCK_SIZE=1MiB # only increase if there is a fast network connection between nodes +# Change this to limit the maximum size of uploads. By default it's +# 5GiB, the maximum chunk size for multipart uploads. +#MAX_REQUEST_BODY_BYTES=5368709120 + ## Bootstrap this node in an existing Garage cluster #BOOTSTRAP_HOST="" #BOOTSTRAP_ID="" diff --git a/README.md b/README.md index f85692b..695e9a8 100644 --- a/README.md +++ b/README.md @@ -122,3 +122,9 @@ For more, see [`garagehq.deuxfleurs.fr`](https://garagehq.deuxfleurs.fr/document To prevent "499 Client Closed Request" errors you should make sure you `READ_TIMEOUT` and `WRITE_TIMEOUT` variables on Traefik are high enough. Same on the proxy if you're reverse-proxying Traefik. + +Change `MAX_REQUEST_BODY_BYTES` to limit the maximum uploaded chunk +size, which could range from 5MiB to 5GiB. Take into account S3 clients +will perform multipart uploads, so this variable doesn't limit the +maximum file size, just what amount of bytes Traefik considers before +closing the connection. diff --git a/compose.yml b/compose.yml index 761877e..c02b530 100644 --- a/compose.yml +++ b/compose.yml @@ -35,7 +35,7 @@ services: - "backupbot.backup=true" - "backupbot.backup.pre-hook=/garage meta snapshot --all" - "backupbot.backup.path=/var/lib/garage/meta/snapshots/,/var/lib/garage/meta/cluster_layout,/var/lib/garage/meta/data_layout,/var/lib/garage/meta/node_key,/var/lib/garage/meta/node_key.pub" - - "traefik.http.middlewares.${STACK_NAME}-buffering.buffering.maxRequestBodyBytes=0" + - "traefik.http.middlewares.${STACK_NAME}-buffering.buffering.maxRequestBodyBytes=${MAX_REQUEST_BODY_BYTES:-5368709120}" volumes: - "${LOCAL_FOLDER_META:-meta}:/var/lib/garage/meta" - "${LOCAL_FOLDER_DATA:-data}:/var/lib/garage/data" -- 2.54.0 From be00ad1823354792ee751877ee3a9b6877a1dcd6 Mon Sep 17 00:00:00 2001 From: f Date: Thu, 29 Oct 2026 17:12:02 -0300 Subject: [PATCH 4/5] fix: typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 695e9a8..f8f04e9 100644 --- a/README.md +++ b/README.md @@ -119,7 +119,7 @@ For more, see [`garagehq.deuxfleurs.fr`](https://garagehq.deuxfleurs.fr/document ## Upload limits -To prevent "499 Client Closed Request" errors you should make sure you +To prevent "499 Client Closed Request" errors you should make sure your `READ_TIMEOUT` and `WRITE_TIMEOUT` variables on Traefik are high enough. Same on the proxy if you're reverse-proxying Traefik. -- 2.54.0 From c712e9a47a34cebdf1fe1a116525df0e4e62b585 Mon Sep 17 00:00:00 2001 From: f Date: Sun, 8 Nov 2026 11:35:39 -0300 Subject: [PATCH 5/5] fix: change order --- README.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index f8f04e9..2e7084c 100644 --- a/README.md +++ b/README.md @@ -102,6 +102,18 @@ abra app deploy Within your chosen monitoring software (ie. Telegraf, Prometheus, etc.), you'll need to make sure it interprets the correct scheme (https), and point it at /metrics as the monitoring endpoint. The secret you copied earlier called metrics_token will be used to authenticate the request. +## Upload limits + +To prevent "499 Client Closed Request" errors you should make sure your +`READ_TIMEOUT` and `WRITE_TIMEOUT` variables on Traefik are high enough. +Same on the proxy if you're reverse-proxying Traefik. + +Change `MAX_REQUEST_BODY_BYTES` to limit the maximum uploaded chunk +size, which could range from 5MiB to 5GiB. Take into account S3 clients +will perform multipart uploads, so this variable doesn't limit the +maximum file size, just what amount of bytes Traefik considers before +closing the connection. + ## Backups > In development, not currently reliable @@ -116,15 +128,3 @@ If you're running Garage in a cluster, when you restore the metadata, other node * Re-deploy Garage: `abra app undeploy -n && sleep 5 && abra app deploy -n ` For more, see [`garagehq.deuxfleurs.fr`](https://garagehq.deuxfleurs.fr/documentation/cookbook/real-world/). - -## Upload limits - -To prevent "499 Client Closed Request" errors you should make sure your -`READ_TIMEOUT` and `WRITE_TIMEOUT` variables on Traefik are high enough. -Same on the proxy if you're reverse-proxying Traefik. - -Change `MAX_REQUEST_BODY_BYTES` to limit the maximum uploaded chunk -size, which could range from 5MiB to 5GiB. Take into account S3 clients -will perform multipart uploads, so this variable doesn't limit the -maximum file size, just what amount of bytes Traefik considers before -closing the connection. -- 2.54.0