Skip to content

fix(tus): drop the hardcoded 1 GiB size limit - #2352

Open
jpnurmi wants to merge 3 commits into
v1from
jpnurmi/fix/tus-max-size
Open

jpnurmi wants to merge 3 commits into
v1from
jpnurmi/fix/tus-max-size

Conversation

@jpnurmi

@jpnurmi jpnurmi commented Nov 27, 2026

Copy link
Copy Markdown
Collaborator

Drop the outdated SDK-side 1 GiB TUS upload limit (SENTRY_MAX_ATTACHMENT_SIZE), which only mattered for creation-with-upload. With creation (empty POST, data via PATCH), Relay rejects an oversized Upload-Length with 413 before any data is sent (getsentry/relay#5685). Relay now allows 10 GiB (getsentry/relay#6515).

Also removes the stale projects:relay-upload-endpoint note (getsentry/relay#6171).

`sentry__attachment_validate()` rejected attachments over 1 GiB. That
matched Relay's former `max_upload_size` default. When Relay introduced
the upload endpoint, it only accepted the file as the body of the
creation request, so the client was already sending an oversized file
by the time Relay rejected it.

Since getsentry/relay#5685, Relay accepts a bodiless TUS creation
request followed by `PATCH` uploads, which is the flow the SDK uses. The
creation request declares `Upload-Length`, and Relay rejects anything
above `max_upload_size` with `413` before any attachment data is sent.
The SDK then drops the attachment-ref item, records a client report, and
sends the rest of the envelope.

getsentry/relay#6515 raised the default `max_upload_size` to 10 GiB,
leaving the SDK-side copy out of sync. Leave the size limit to the
server.
The note named `projects:relay-upload-endpoint`, which Relay removed
when the upload endpoint became generally available in
getsentry/relay#6171. The remaining upload flags are temporary rollout
flags: `projects:resumable-uploads` makes uploads resumable, and
`projects:relay-minidump-uploads` gates minidump uploads. Naming them
in the API docs would go stale the same way.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants