Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

slow cleanup in device_lists_outbound_pokes #16480

Open
matrixbot opened this issue Dec 21, 2023 · 0 comments
Open

slow cleanup in device_lists_outbound_pokes #16480

matrixbot opened this issue Dec 21, 2023 · 0 comments

Comments

@matrixbot
Copy link
Collaborator

matrixbot commented Dec 21, 2023

This issue has been migrated from #16480.


There is a cleanup job called prune_old_outbound_device_pokes (https://github.com/matrix-org/synapse/blob/v1.93.0/synapse/storage/databases/main/devices.py#L1297-L1388) which periodically attempts to clear out the device_lists_outbound_pokes table a bit.

The SELECT query can sometimes be very slow and IO-intensive. Sometimes it even takes longer than the 1 hour request timeout, meaning that it gets stuck without ever making any progress.

@erikjohnston suggests:

I do kinda want to change this, so we have two tables: the current table, and a duplicate which only holds the latest destination/user -> stream ID

@matrixbot matrixbot changed the title Dummy issue slow cleanup in device_lists_outbound_pokes Dec 22, 2023
@matrixbot matrixbot reopened this Dec 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant