ether / ep_webrtc

Audio & Video chat for Etherpad - Video Conferencing with a focus on collaboration
Apache License 2.0
74 stars 21 forks source link

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

Open psilofski opened 3 years ago

psilofski commented 3 years ago

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...

JohnMcLear commented 3 years ago

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.

rhansen commented 3 years ago

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.

kvabakoma commented 3 years ago

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?

psilofski commented 3 years ago

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

moonrailgun commented 2 years ago

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

rhansen commented 2 years ago

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

gpbollbach commented 9 months ago

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

JohnMcLear commented 9 months ago

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 :)