Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

If a "Limit Exceeded" error is returned, there should be no change to the database. #13427

Closed
RomanOlegovich opened this issue Aug 1, 2022 · 3 comments

Comments

@RomanOlegovich
Copy link

Description

  1. If a "Limit Exceeded" error is returned, there should be no change to the database.

  2. I have configs like below, it has a big speed limit. I tried send 3000 request synchronously (one by one). Why I got this error?

rc_registration:
 per_second: 1000
 burst_count: 1000

rc_login:
 address:
  per_second: 1000
  burst_count: 1000
 account:
  per_second: 1000
  burst_count: 1000

rc_admin_redaction:
 per_second: 1000
 burst_count: 1000

rc_joins:
 local:
  per_second: 1000
  burst_count: 1000
 remote:
  per_second: 1000
  burst_count: 1000

rc_invites:
 per_room:
  per_second: 1000
  burst_count: 1000
 per_user:
  per_second: 1000
  burst_count: 1000

Steps to reproduce

  • Send 3000 requests one by one to create a rooms. In my case it's direct room.
  • Get error: "Limit exceeded" + "retry_after_ms=N",
  • Wait N ms plus a 5 seconds
  • Repeat the request
  • Get error: "Room alias already taken"

Homeserver

homeserver

Synapse Version

{"server_version":"1.63.1","python_version":"3.9.13"}

Installation Method

No response

Platform

container in swarm

Relevant log output

- Has not, but I'll do this if need

Anything else that would be useful to know?

No response

@richvdh
Copy link
Member

richvdh commented Aug 1, 2022

Essentially a duplicate of #8895 I think

@RomanOlegovich
Copy link
Author

RomanOlegovich commented Aug 7, 2022

@richvdh Why I get rate limit exception if was set as below?

rc_invites:
 per_room:
  per_second: 1000
  burst_count: 1000
 per_user:
  per_second: 1000
  burst_count: 1000

I don't found rc_CREATE_ROOM or other options to set limit of room creation

@DMRobertson
Copy link
Contributor

DMRobertson commented Aug 8, 2022

@RomanOlegovich If you are using Synapse 1.64 then there is a new rate limit rc_joins_per_room (#13276) that you likely need to adjust. If that doesn't help, please open a new issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants