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

Disable Postgres statement timeouts while purging room state #18133

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

realtyem
Copy link
Contributor

@realtyem realtyem commented Feb 3, 2025

I tried to delete and purge #matrix:matrix.org from my server. The miscellaneous room data was deleted just fine. But I found that there was state still hanging around, then discovered this in my logs:

2025-01-28 21:39:56,756 - synapse.storage.txn - 787 - WARNING - task-shutdown_and_purge_room-0-ruJgsVyacLWdLRiW-!OGEhHVWSdvArJzumhm:matrix.org - [TXN OPERROR] {purge_room_state-136b} canceling statement due to statement timeout
 0/5
2025-01-28 22:39:57,386 - synapse.storage.txn - 787 - WARNING - task-shutdown_and_purge_room-0-ruJgsVyacLWdLRiW-!OGEhHVWSdvArJzumhm:matrix.org - [TXN OPERROR] {purge_room_state-136b} canceling statement due to statement timeout
 1/5
2025-01-28 23:39:58,688 - synapse.storage.txn - 787 - WARNING - task-shutdown_and_purge_room-0-ruJgsVyacLWdLRiW-!OGEhHVWSdvArJzumhm:matrix.org - [TXN OPERROR] {purge_room_state-136b} canceling statement due to statement timeout
 2/5
2025-01-29 00:39:59,486 - synapse.storage.txn - 787 - WARNING - task-shutdown_and_purge_room-0-ruJgsVyacLWdLRiW-!OGEhHVWSdvArJzumhm:matrix.org - [TXN OPERROR] {purge_room_state-136b} canceling statement due to statement timeout
 3/5
2025-01-29 01:40:01,788 - synapse.storage.txn - 787 - WARNING - task-shutdown_and_purge_room-0-ruJgsVyacLWdLRiW-!OGEhHVWSdvArJzumhm:matrix.org - [TXN OPERROR] {purge_room_state-136b} canceling statement due to statement timeout
 4/5
2025-01-29 02:40:03,991 - synapse.storage.txn - 787 - WARNING - task-shutdown_and_purge_room-0-ruJgsVyacLWdLRiW-!OGEhHVWSdvArJzumhm:matrix.org - [TXN OPERROR] {purge_room_state-136b} canceling statement due to statement timeout
 5/5
2025-01-29 02:40:04,013 - synapse.util.task_scheduler - 442 - ERROR - task-shutdown_and_purge_room-0-ruJgsVyacLWdLRiW - scheduled task ruJgsVyacLWdLRiW failed

After making this change, the actual data took 1.18 hours to actually finish.
This is done for _purge_rooms_txn(), feels right it should be over here too.

Pull Request Checklist

@realtyem realtyem marked this pull request as ready for review February 3, 2025 21:47
@realtyem realtyem requested a review from a team as a code owner February 3, 2025 21:47
@realtyem realtyem changed the title Disable statement timeouts for while purging room state Disable Postgres statement timeouts while purging room state Feb 5, 2025
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.

1 participant