From 2161d8470169acdd8c8ad11d5ab5e980a07b98f0 Mon Sep 17 00:00:00 2001 From: Hampus Date: Wed, 30 Sep 2026 22:55:12 +0200 Subject: [PATCH] fix(self-hosting): grow seaweedfs one volume at a time (#3076) --- deploy/self-hosting/.env.example | 5 +++++ deploy/self-hosting/docker-compose.yml | 1 + fluxer_docs/src/content/docs/operator/configuration.mdx | 4 ++++ .../src/__tests__/SelfHostingComposeEnvironment.test.ts | 1 + 4 files changed, 11 insertions(+) diff --git a/deploy/self-hosting/.env.example b/deploy/self-hosting/.env.example index 1b4f81224..d533e9f6f 100644 --- a/deploy/self-hosting/.env.example +++ b/deploy/self-hosting/.env.example @@ -448,6 +448,11 @@ FLUXER_DISCOVERY_ENABLED=true #FLUXER_SEAWEEDFS_GOMEMLIMIT=1536MiB #FLUXER_SEAWEEDFS_TELEMETRY=false +# Volumes SeaweedFS creates at once when a bucket needs space. Each reserves 1 GB +# of free disk from the start, and SeaweedFS's own default of 7 fills a small +# disk before every bucket has one, so uploads fail with no free volumes left. +#FLUXER_SEAWEEDFS_VOLUME_GROWTH=1 + # Node sizes its heap from the container limit by default. Leave these unset # unless you need to pin it. A heap ceiling above the container limit gets the # container OOM-killed instead of reporting a heap error. The values below are diff --git a/deploy/self-hosting/docker-compose.yml b/deploy/self-hosting/docker-compose.yml index 2f42dfdcc..abc0f4941 100644 --- a/deploy/self-hosting/docker-compose.yml +++ b/deploy/self-hosting/docker-compose.yml @@ -353,6 +353,7 @@ services: memory: ${FLUXER_SEAWEEDFS_MEMORY_LIMIT:-2gb} environment: GOMEMLIMIT: ${FLUXER_SEAWEEDFS_GOMEMLIMIT:-1536MiB} + WEED_MASTER_VOLUME_GROWTH_COPY_1: ${FLUXER_SEAWEEDFS_VOLUME_GROWTH:-1} command: ["server", "-s3", "-dir=/data", "-master.telemetry=${FLUXER_SEAWEEDFS_TELEMETRY:-false}"] volumes: - seaweedfs-data:/data diff --git a/fluxer_docs/src/content/docs/operator/configuration.mdx b/fluxer_docs/src/content/docs/operator/configuration.mdx index 9678b97fd..4a8eebc4e 100644 --- a/fluxer_docs/src/content/docs/operator/configuration.mdx +++ b/fluxer_docs/src/content/docs/operator/configuration.mdx @@ -1834,6 +1834,10 @@ Default `1536MiB`. The heap ceiling the Go runtime collects against. Go cannot s Default `false`. Becomes the `-master.telemetry` flag of `seaweedfs`, which reports usage to the SeaweedFS project when on. +#### `FLUXER_SEAWEEDFS_VOLUME_GROWTH` + +Default `1`. Becomes `WEED_MASTER_VOLUME_GROWTH_COPY_1`, the number of volumes SeaweedFS creates at once when a bucket runs out of room. Each volume reserves a 1 GB slot of free disk, and the stack writes to four buckets. SeaweedFS's own default of 7 needs about 28 GB free before every bucket has a volume, so on a smaller disk the first bucket takes every slot and uploads fail with `No writable volumes and no free volumes left`. + #### `FLUXER_SEAWEEDFS_INIT_MEMORY_LIMIT` Default `128mb`. The ceiling for `seaweedfs-init`. A one-shot container that exits, so it never overlaps steady state. diff --git a/packages/config/src/__tests__/SelfHostingComposeEnvironment.test.ts b/packages/config/src/__tests__/SelfHostingComposeEnvironment.test.ts index 27a684cf9..3b0dd1b23 100644 --- a/packages/config/src/__tests__/SelfHostingComposeEnvironment.test.ts +++ b/packages/config/src/__tests__/SelfHostingComposeEnvironment.test.ts @@ -49,6 +49,7 @@ const INPUT_NAMES: Record = { MEILI_NO_ANALYTICS: 'FLUXER_MEILISEARCH_NO_ANALYTICS', MEILI_MAX_INDEXING_MEMORY: 'FLUXER_MEILISEARCH_MAX_INDEXING_MEMORY', GOMEMLIMIT: 'FLUXER_SEAWEEDFS_GOMEMLIMIT', + WEED_MASTER_VOLUME_GROWTH_COPY_1: 'FLUXER_SEAWEEDFS_VOLUME_GROWTH', LIVEKIT_KEYS: 'LIVEKIT_API_KEY', NODE_EXTRA_CA_CERTS: 'FLUXER_NODE_EXTRA_CA_CERTS', };