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

Join endpoints are rate-limited even if the user has already joined the room #8146

Closed
freelock opened this issue Aug 21, 2020 · 5 comments · Fixed by #8153
Closed

Join endpoints are rate-limited even if the user has already joined the room #8146

freelock opened this issue Aug 21, 2020 · 5 comments · Fixed by #8153

Comments

@freelock
Copy link

Description

In the Drupal integration, before sending a message into a room, the API first sends a join to make sure the account is present. Since 1.19.0, this is now resulting in a lot of M_LIMIT_EXCEEDED errors, and interrupting the rest of the processing if not caught/otherwise handled. My assumption is that this end point is idempotent, and by calling it before sending, I'm potentially saving a round trip of having to hit an endpoint to see if the account is already joined, and then again to join if it's not.

In #matrix-dev:matrix.org, @tulir pointed me to #8138 , so I updated the Docker image from the github develop.zip after that PR was merged (I think), but I'm still getting errors.

I think that #8008 is what caused this, and #8138 did not fix the ratelimit_overide user accounts. Needs an additional fix for this table?

Version information

  • Homeserver: matrix.freelock.com

If not matrix.org:

  • 1.19.0:

  • Install method:

Docker image built from release tarball.

  • Platform:

Debian stretch container.

@babolivier
Copy link
Contributor

babolivier commented Aug 24, 2020

Thanks for your report! As I understanding, your issue isn't so much that the ratelimit_override table is being ignored on joins, but that the idempotency on the join endpoints broke as of #8008. This is a serious regression, which will be fixed by #8153 and released in 1.19.1 (coming out later this week). With this fix, the only operation that'll actually get rate-limited will be actually joining new users to a room.

@babolivier
Copy link
Contributor

If the ratelimiter ignoring the override table (which is currently only used by the message ratelimiter and not the others) is also an issue for you, could you please open a separate issue on this repo?

@babolivier babolivier changed the title Rate limit on joins ignores ratelimit_override table? Join endpoints are rate-limited even if the user has already joined the room Aug 24, 2020
@freelock
Copy link
Author

Reading the PR, this sounds right to me -- the issue is I'm getting a ratelimit error on rooms the account is already a member of.

@babolivier
Copy link
Contributor

#8153 has been merged into the release branch, so I'm closing this issue.

@babolivier
Copy link
Contributor

FYI the fix to this issue has just been released in Synapse v1.19.1 🙂

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

Successfully merging a pull request may close this issue.

2 participants