ep_webrtc icon indicating copy to clipboard operation
ep_webrtc copied to clipboard

Rate Limited. You sent too many messages to this pad so it disconnected you.

Open psilofski opened this issue 5 years ago • 8 comments

Bug After that a second person connects, be it in the same subnet or Internet, then me (and the other person) we get disconnected with the said message.

Logs Just before the disconnects, syslog gets a fast cascade of many (15-20) warnings as this:

Jan  7 08:25:05 etherpad run.sh[1663]: #033[33m[2021-01-07 08:25:05.751] 
[WARN] message - #033[39mDropped message, unknown COLLABROOM Data  Type RTC_MESSAGE

Others affected The titled issue is mentioned, here: #4340 and the culprit was some other plugin (ex. ep_cursortrace)

Platform/Reproduction For the record, I am on proxmox with https://www.turnkeylinux.org/etherpad (1.8.6, on nginx), either with lxc or kvm. If also it is of any importance, my stun server seems to work fine but my turn one, probably not...

Workaround At the settings.json, as mentioned and in the #4340, increase maximum number of chanes per IP (commitRateLimiting.points) to more than 20 (relevant to how many messages you get cascading on logs). I have set 100 to be safe...

psilofski avatar Jan 07 '21 14:01 psilofski

Yea, I am kinda aware of this but haven't had time yet. Basically rate limiting is desirable, but rtc does a lot more messages than I anticipated.

I'm not sure if we should modify core to limit just commit messages or if we should try see if we can reduce rtc spam, it requires investigating.

JohnMcLear avatar Jan 07 '21 14:01 JohnMcLear

The messages could be moved to a different socket.io namespace, or they could use a different "component" registered in SocketIORouter.js. Either approach would avoid the PadMessageHandler.js rate limiter.

Using a separate namespace or component would also bypass the normal access check. We could do that check in ep_webrtc, but it would probably be better to move the access check up in Etherpad core so that it applies to all messages.

rhansen avatar Mar 04 '21 09:03 rhansen

Increasing the commitRateLimiting.points to 100 does not really work for me. Once 2 users connect to the same pad with ep_webrtc enabled, we get the Rate Limited error. Even ridiculous values like 99999 wouldn't solve it for me.

Did it work for you?

kvabakoma avatar Mar 31 '21 16:03 kvabakoma

Yes, it did work... But I have also set importExportRateLimiting max:100. Have you checked your syslog while the error is occuring?

psilofski avatar Apr 02 '21 03:04 psilofski

Hello, is any update for this issue? This 2022 and i still facing this problem

moonrailgun avatar Feb 25 '22 16:02 moonrailgun

@moonrailgun Sorry, no update. Nobody has the time/funding to fix this right now. Pull requests or sponsorship are welcome.

rhansen avatar Mar 01 '22 22:03 rhansen

Hello, we are still facing this at the end of 2023. We are theoretically open for funding options, please elaborate.

gpbollbach avatar Dec 20 '23 11:12 gpbollbach

Hi @gpbollbach

@rhansen already explained the solution, it's a low hanging fruit so any medium proficiency JS dev could pick this up. I think you can create bounties for bugs on various platforms so that might be your quick win?

Alternatively, you can fund @ether on Github and that helps us prioritise bugs.

Keep shouting though too, we want to encourage more people from the community to work on things! I'll help by posting this in Discord and seeing if someone wants to work on it :)

JohnMcLear avatar Dec 20 '23 11:12 JohnMcLear