-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Handling state_ids responses loads huge amounts of events into memory at once, causing OOMs #6597
Comments
I wonder if this has been caused (or exacerbated) by us deploying #6556 |
right, so the problem here is that synapse is returning the auth_events for each of the events in the state of the room at the given event_id. This is consistent with the spec; however it seems to be utterly pointless. For a given event in the state, either:
|
unfortunately, as of #7817, synapse won't recursively fetch auth events in this way :/ |
On reflection, it's correct that we return all these auth events. The problem is that we load them all into memory at once. |
this might be a bit better since #9601, but it's still problematic |
To summarise:
Relevant bits of source: synapse/synapse/federation/transport/server/federation.py Lines 171 to 185 in da2c93d
synapse/synapse/federation/federation_server.py Lines 562 to 581 in 1eed795
synapse/synapse/federation/federation_server.py Lines 583 to 590 in 1eed795
|
For example: the response to
matrix://matrix.org/_matrix/federation/v1/state_ids/%21jWRVQAlVGjigKCRGwS%3Amatrix.org?event_id=%241577162865947686RYsuB%3Amatrix.org
includes an auth chain with 22327 events. surely there can't be that many events in$1577162865947686RYsuB:matrix.org
's auth chain?The text was updated successfully, but these errors were encountered: