Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/7864.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix in-memory federation transmission queues building up indefinitely.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's this mean to an end-user? Is there a behavior that is fixed with this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about

Stop leaking memory when remote servers have been unreachable for a long time.

?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe:

Fix a memory leak by limiting the number of messages queued for a remote server that has been unreachable for a long time.

5 changes: 5 additions & 0 deletions synapse/federation/sender/per_destination_queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,11 @@ async def _transaction_transmission_loop(self) -> None:
(e.retry_last_ts + e.retry_interval) / 1000.0
),
)

# don't let the pending event queues stack up
self._pending_pdus = []
self._pending_edus = []
self._pending_edus_keyed = {}
except FederationDeniedError as e:
logger.info(e)
except HttpResponseException as e:
Expand Down