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

Encrypte messages are now rate lmited #13280

Closed
Erko21 opened this issue Jul 15, 2022 · 5 comments
Closed

Encrypte messages are now rate lmited #13280

Erko21 opened this issue Jul 15, 2022 · 5 comments
Labels
T-Other Questions, user support, anything else.

Comments

@Erko21
Copy link

Erko21 commented Jul 15, 2022

Description

Encrypted messages are not delivered due to rate limit

Steps to reproduce

-Spam from 5 to 10 messages
It will return "to many requests"

Homeserver

private server from synapse container

Synapse Version

1.62.0

Installation Method

Docker (matrixdotorg/synapse)

Platform

-hardware
-vm

Relevant log output

matrix-synapse-1  | 2022-07-15 08:07:53,126 - synapse.access.http.8008 - 450 - INFO - PUT-186 - ::ffff:172.30.0.3 - 8008 - {@vlad3:matrix-dev.kryptr.li} Processed request: 0.021sec/0.001sec (0.006sec, 0.002sec) (0.002sec/0.012sec/6) 80B 429 "PUT /_matrix/client/r0/rooms/!OaqzgJXClbmeqyhemq:matrix-dev.kryptr.li/send/m.room.encrypted/1022e017-1234-4718-ba55-89a441158dc4 HTTP/1.0" "okhttp/4.9.2" [0 dbevts]
matrix-synapse-1  | 2022-07-15 08:07:54,128 - synapse.access.http.8008 - 450 - INFO - PUT-187 - ::ffff:172.30.0.3 - 8008 - {@vlad3:matrix-dev.kryptr.li} Processed request: 0.012sec/0.001sec (0.002sec, 0.000sec) (0.001sec/0.004sec/5) 80B 429 "PUT /_matrix/client/r0/rooms/!OaqzgJXClbmeqyhemq:matrix-dev.kryptr.li/send/m.room.encrypted/5f5ab5a7-0c61-4d13-b92a-7bd80781ca20 HTTP/1.0" "okhttp/4.9.2" [0 dbevts]
matrix-synapse-1  | 2022-07-15 08:07:54,955 - synapse.access.http.8008 - 450 - INFO - PUT-188 - ::ffff:172.30.0.3 - 8008 - {@vlad3:matrix-dev.kryptr.li} Processed request: 0.021sec/0.001sec (0.010sec, 0.000sec) (0.004sec/0.006sec/5) 79B 429 "PUT /_matrix/client/r0/rooms/!OaqzgJXClbmeqyhemq:matrix-dev.kryptr.li/send/m.room.encrypted/c5553b28-84b3-4ce8-af35-e7f971000552 HTTP/1.0" "okhttp/4.9.2" [0 dbevts]
matrix-synapse-1  | 2022-07-15 08:07:55,815 - synapse.access.http.8008 - 450 - INFO - PUT-193 - ::ffff:172.30.0.3 - 8008 - {@vlad3:matrix-dev.kryptr.li} Processed request: 0.037sec/0.002sec (0.003sec, 0.000sec) (0.001sec/0.011sec/4) 59B 200 "PUT /_matrix/client/r0/rooms/!OaqzgJXClbmeqyhemq:matrix-dev.kryptr.li/send/m.room.encrypted/e267ddd7-b426-496e-a2f7-9ef9edb598e7 HTTP/1.0" "okhttp/4.9.2" [0 dbevts]
matrix-synapse-1  | 2022-07-15 08:07:55,821 - synapse.access.http.8008 - 450 - INFO - GET-185 - ::ffff:172.30.0.3 - 8008 - {@vlad3:matrix-dev.kryptr.li} Processed request: 2.880sec/0.001sec (0.002sec, 0.000sec) (0.002sec/0.003sec/1) 1351B 200 "GET /_matrix/client/r0/sync?since=s40940_62244_0_28145_1_310_11140_2595_0&timeout=45000 HTTP/1.0" "okhttp/4.9.2" [0 dbevts]
matrix-synapse-1  | 2022-07-15 08:07:56,573 - synapse.access.http.8008 - 450 - INFO - PUT-196 - ::ffff:172.30.0.3 - 8008 - {@vlad3:matrix-dev.kryptr.li} Processed request: 0.021sec/0.001sec (0.006sec, 0.001sec) (0.003sec/0.007sec/6) 80B 429 "PUT /_matrix/client/r0/rooms/!OaqzgJXClbmeqyhemq:matrix-dev.kryptr.li/send/m.room.encrypted/1160b35f-afd2-4337-b1d2-62a6e5528eb7 HTTP/1.0" "okhttp/4.9.2" [0 dbevts]
matrix-synapse-1  | 2022-07-15 08:07:57,569 - synapse.access.http.8008 - 450 - INFO - PUT-197 - ::ffff:172.30.0.3 - 8008 - {@vlad3:matrix-dev.kryptr.li} Processed request: 0.021sec/0.001sec (0.005sec, 0.000sec) (0.002sec/0.013sec/5) 80B 429 "PUT /_matrix/client/r0/rooms/!OaqzgJXClbmeqyhemq:matrix-dev.kryptr.li/send/m.room.encrypted/18ba0c78-bae9-43f6-b6d0-530ec98ff014 HTTP/1.0" "okhttp/4.9.2" [0 dbevts]

Anything else that would be useful to know?

No response

@tongowen
Copy link

tongowen commented Jul 15, 2022 via email

@DMRobertson
Copy link
Contributor

Encrypte messages are now rate lmited

When you say "now", what do you mean? I'm not aware of anything specific to rate limiting changing in the 1.62 release.

If you control the homeserver you're sending these messages to, you can relax the ratelimits in the config. I think rc_message controls sending messages into a room, see https://matrix-org.github.io/synapse/latest/usage/configuration/config_documentation.html#ratelimiting.

Generally speaking though, Matrix endpoint are rate limited to mitigate abuse.

@Erko21
Copy link
Author

Erko21 commented Jul 15, 2022

We just migrated from v1.61.1 without changing any configurations.
On previous versions it was working.
On both versions rc_message is default

@DMRobertson
Copy link
Contributor

Possibly #13018, I suppose.

In any case, I think your best option is to either bump rc_message, or else use the Admin API to add a rate limit exception for a particular user.

@squahtx squahtx added the T-Other Questions, user support, anything else. label Jul 15, 2022
@squahtx
Copy link
Contributor

squahtx commented Jul 15, 2022

I'll close the issue, since it appears to be an expected outcome of #13018.

As dmr says:

In any case, I think your best option is to either bump rc_message, or else use the Admin API to add a rate limit exception for a particular user.

@squahtx squahtx closed this as not planned Won't fix, can't repro, duplicate, stale Jul 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
T-Other Questions, user support, anything else.
Projects
None yet
Development

No branches or pull requests

4 participants