Skip to content

Revert "Limit outgoing to_device EDU size to 65536"#19614

Merged
erikjohnston merged 1 commit into
developfrom
revert-18416-edu-limit-size
Mar 27, 2026
Merged

Revert "Limit outgoing to_device EDU size to 65536"#19614
erikjohnston merged 1 commit into
developfrom
revert-18416-edu-limit-size

Conversation

@erikjohnston
Copy link
Copy Markdown
Member

@erikjohnston erikjohnston commented Mar 27, 2026

Reverts #18416

Unfortunately, this causes failures on /sendToDevice endpoint in normal circumstances. If a single user has, say, a hundred devices then we easily go over the limit. This blocks message sending entirely in encrypted rooms.

cc @MadLittleMods @MatMaul

@erikjohnston erikjohnston marked this pull request as ready for review March 27, 2026 10:31
@erikjohnston erikjohnston requested a review from a team as a code owner March 27, 2026 10:31
@MatMaul
Copy link
Copy Markdown
Contributor

MatMaul commented Mar 27, 2026

Humm sorry for that, annoying.

We could also split the map of devices for a single user.

@MatMaul
Copy link
Copy Markdown
Contributor

MatMaul commented Mar 27, 2026

I'll probably not be able to do so before the next RC however so let's revert indeed.

@erikjohnston
Copy link
Copy Markdown
Member Author

Humm sorry for that, annoying.

It happens!

We could also split the map of devices for a single user.

I think there are a few things we can do:

  1. Split the map of devices up
  2. For EDUs that can't be split up, send in their own transaction (so long as its lower than the max request size)
  3. Add a proper hard-error when a client tries and sends a to-device message that is too big to fit into a transaction. I very much doubt any existing to-device message being sent is anywhere near the limit

@erikjohnston erikjohnston merged commit 0549307 into develop Mar 27, 2026
33 of 36 checks passed
@erikjohnston erikjohnston deleted the revert-18416-edu-limit-size branch March 27, 2026 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants