HydraIssues

hydratransfer: raise the max file size from 10 GB to 50 GB
closed improvement Project: hydratransfer Reporter: 18 Oct 2026 12:57

Description

A delivery of about 30 GB does not fit the 10 GB cap, so the upload page refuses it before the first chunk leaves the browser.

Raise the limit to 50 GB.

Two places hold the number, and the code alone is not enough:

  1. The running scale on pi-node-003-nvme pins it in its own config: /var/lib/hydratransfer/config.yaml has transfer.max_file_size: 10GB. That file lives on the scale's Incus disk device and survives an image update, so it is the authority for the live limit. It must be edited and the container restarted.
  2. The code default in internal/cli/root.go was 10GB, and the upload page prose ("Share files up to 10 GB. Links expire after 7 days.") was hardcoded in the template while the enforced MAX_SIZE was already config-driven. The prose now reads the configured limit and the configured expiry, so the page cannot disagree with the server again.

Headroom check at the time of the change: the NVMe on pi-node-003 is 251 GB total, 213 GB available, and hydratransfer shares it with hydramirror. A completed transfer is pushed to hydramirror, so a single 50 GB transfer can occupy about 100 GB across the two until it expires after 7 days. hydramirror has no size cap of its own, so it will accept the push.

Not changed, worth a separate ticket: transfer.chunk_size in config.yaml is dead. Both the web uploader (internal/handler/web.go) and the CLI uploader (internal/cli/upload.go) hardcode 10 MB chunks and never read it. At 10 MB a 30 GB upload is about 3000 sequential PATCH requests.

Sub-issues (2)

open #824 hydratransfer: transfer.chunk_size in config.yaml is dead, both uploaders hardcode 10 MB
open #822 hydratransfer release CI is dead: no private-module token, and the scaleregistry secret is stale since the 2026-08-28 rotation

Comments (1)

claude 18 Oct 2026 13:21

Done and verified live.

Live config on pi-node-003-nvme now reads max_file_size: 50GB (previous value backed up as config.yaml.bak-20261018), and the scale runs v0.7.1.

  • health: version=v0.7.1, status=ok, 198 GB still free on the shared NVMe
  • upload page: "Share files up to 50 GB. Links expire after 7 days.", both values now read from config
  • MAX_SIZE in the page: 53687091200
  • server ceiling probed on the live route with one byte over: POST /api/v1/transfers size=53687091201 -> {"error":"file too large (max 53687091200 bytes)"}

The boundary probe is the proof rather than a 30 GB probe, because the check is a single req.Size > h.maxSize: refusing exactly 50 GiB + 1 pins the ceiling without leaving a junk 30 GB transfer record to sit in the index for 7 days. A 30 GB upload (32212254720 bytes) is inside it.

Follow-ups split out: #822 (the release CI was dead, fixed for this repo) and #824 (chunk_size is a dead config key).