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

Homeserver ratelimit responses are not properly respected #693

Open
nexy7574 opened this issue Jan 19, 2025 · 1 comment
Open

Homeserver ratelimit responses are not properly respected #693

nexy7574 opened this issue Jan 19, 2025 · 1 comment

Comments

@nexy7574
Copy link
Contributor

When running as a bot user account (with ratelimits), some actions (such as mass-redactions and unban re-inviting) may fail as the current ratelimit handler does not respect the ratelimit response. As a result, the ratelimiter has a low chance of success, as repeated ratelimited requests to Synapse will increase the ratelimit exponentially, faster than Draupnir's fallback does.

@nexy7574
Copy link
Contributor Author

There are two issues here.

The first issue is about to be fixed in an upcoming pull request, where the rate-limit response is incorrectly handled due to a check for an always undefined property in the response error object.

The second issue is that rate-limits are difficult to predict and categorise, meaning that when a rate-limit is encountered, it has to be waited out before additional actions can be taken (for example, if a redact batch succeeds in rooms A, B, and C, but gets rate-limited in D, rooms E, F, and G have to wait until D's rate-limit expires, even if they would not have been rate-limited themselves)

nexy7574 added a commit that referenced this issue Jan 19, 2025
This fixes the first problem raised in #693

Signed-off-by: nexy7574 <[email protected]>
Gnuxie added a commit that referenced this issue Jan 19, 2025
* Fix the individual request rate-limit

This fixes the first problem raised in #693

---------

Signed-off-by: nexy7574 <[email protected]>
Co-authored-by: Gnuxie <[email protected]>
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

No branches or pull requests

1 participant