element-hq / element-hq/synapse

Unconfigurable harsh ratelimiting for leaving rooms

Open
#16,006 0 comments 0 reactions 0 assignees View on GitHub
A-Config A-Leave O-Occasional S-Minor T-Enhancement
Dominant language
Python
Stars
4.6k
Forks
600
Avg merge
5d 22h
Merged PRs (30d)
51

Description

This issue has been migrated from [#16006](https://github.com/matrix-org/synapse/issues/16006).

---

### Description

Clients (at least Element) have an option to leave a space and leave all rooms in it.

![image](https://github.com/matrix-org/synapse/assets/24363938/ba13efe1-f2e6-44b9-83be-88a9fada5a30)

If you choose to leave all rooms, the client will make leave requests for every room you are on.

If you are on many rooms, this will take a long time, to the point it seems like it hangs. Looking at the network tab in the developer tools shows a lot of 429 Too Many Requests responses.

In conclusion, the defualt ratelimiting for leaving rooms is too harsh. It doesn't seem like it can be overriden either:

https://matrix-org.github.io/synapse/latest/usage/configuration/config_documentation.html has mention of `rc_joins` but there is no `rc_leaves`

### Steps to reproduce

- join a space on Element on a homeserver using the default rate limits
- join many rooms
- leave the space, choosing to leave all rooms

### Homeserver

matrix.mit.edu

### Synapse Version

{"server_version":"1.88.0","python_version":"3.10.6"}

### Installation Method

Debian packages from packages.matrix.org

### Database

PostgreSQL

### Workers

Single process

### Platform

Ubuntu 22.04.2, PowerEdge R710

### Configuration

_No response_

### Relevant log output

```shell
N/A
```

### 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.