element-hq / element-hq/synapse

Delete room (admin-api) fails/timeouts before done.

Open
#17,800 2 comments 3 reactions 0 assignees View on GitHub
A-Admin-API A-purge-room
Dominant language
Python
Stars
4.6k
Forks
600
Avg merge
5d 22h
Merged PRs (30d)
51

Description

### Description

When I use delete room through Synapse admin-api, no matter v1 or v2, if it is massive room, after some 4-6 hours (not really timed) or so the delete task will fail, despite there was being PSQL thread for delete for full load all that time... But if I just keep rerunning the task, eventually it will success.. Here is an excerpt from one room through v2 that I first tried couple times with v1 api, then with v2:

```json
{
"results": [
{
"delete_id": "UmVcAHOubayaZUVX",
"status": "failed",
"shutdown_room": null
},
{
"delete_id": "eRURlGTxWZdZalLa",
"status": "failed",
"shutdown_room": null
},
{
"delete_id": "vDZzfLohvBiHCJke",
"status": "complete",
"shutdown_room": {
"kicked_users": [],
"failed_to_kick_users": [],
"local_aliases": [],
"new_room_id": null
}
}
]
}
```

### Steps to reproduce

- Have massive room to delete
- Hit `/_synapse/admin/v2/rooms/`
- Wait.

### Homeserver

hacklab.fi

### Synapse Version

1.116.0

### Installation Method

Debian packages from packages.matrix.org

### Database

Single PSQL 17

### Workers

Multiple workers

### Platform

Debian 12, 8 core, 32g RAM Upcloud VM, 100k IOPS-

### Configuration

Presence is enabled, MSCs for Hookshot E2E are enabled.

### Relevant log output

```shell
Haven't found the relevant spot, but as the thing _eventually_ works, I'm 99.9% sure it is some form of timeout.
```

### Anything else that would be useful to know?

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.