Skip to content

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

Merged
jpnurmi merged 4 commits into
v1from
jpnurmi/fix/tus-max-size
Nov 30, 2026
Merged

jpnurmi merged 4 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). Related docs: getsentry/sentry-docs#20993.

`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.
@jpnurmi
jpnurmi merged commit b1987bf into v1 Nov 30, 2026
73 checks passed
@jpnurmi
jpnurmi deleted the jpnurmi/fix/tus-max-size branch November 30, 2026 09:36
@github-actions

Copy link
Copy Markdown
Fails
🚫 Please consider adding a changelog entry for the next release.

Instructions and example for changelog

Please add an entry to CHANGELOG.md to the "Unreleased" section. Make sure the entry includes this PR's number.

Example:

## Unreleased

### Fixes

- drop the hardcoded 1 GiB size limit ([#2352](https://github.com/getsentry/sentry-native/pull/2352))

If none of the above apply, you can opt out of this check by adding #skip-changelog to the PR description or adding a skip-changelog label.

Generated by 🚫 dangerJS against 084bb40

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.

3 participants