-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Apparently we are sending way too many typing notifications #29107
Comments
Screen.Recording.2025-01-27.at.11.32.25.movHalf of the requests are CORS preflight which we cannot avoid. Looks like the current logic is to re-send every 10s rather than 30s and testing it, seems to behave exactly like that. With one caveat being if you empty the composer that sends a stopped typing signal. So if your typing style involves clearing the composer a lot then you would indeed see that pattern. This feels like something your HS should debounce over federation for risk of getting dev/null'd |
Small correction: it's a c2s proxy, that filters typing notifs from local users, based on the amount of remote servers in the room they would be sent to. Logs from yesterday, sending a couple of messages in TWIM. No clearing of the input field except for sending messages, though I do pause while typing and/or go back to reword stuff differently. It's hard to capture on video :')
You can see multiple events where it sends a 'stopped typing' 10 seconds after starting, immediately followed by a 'start typing', sent within the same second. |
Steps to reproduce
https://git.pixie.town/f0x/synapse-edulimit has been created as a c2s proxy which ratelimits typing notifications. However, the actual reason it's needed seems to be that EW sounds like it is sending way too many typing notif events. In theory, we should be sending an update when the user starts typing, and then a keepalive every ~30s, and/or a cancellation when they clear the composer.
But in practice
says https://matrix.to/#/!QQpfJfZvqxbCfeDgCj:matrix.org/$MRlYWUiNL0ib2gyPD40r16zVY1mxFDgR6Gm_5BeGams?via=matrix.org&via=envs.net&via=element.io
which sounds like 28 typing notifications just by sending 3 messages in a room.
f0x said:
Which sounds like we might have a regression in the debouncing.
Outcome
What did you expect?
Typing notifs shouldn't DoS your server, let alone other servers.
What happened instead?
The act of typing a string of messages sent 50K HTTP hits in #twim. Which feels excessive.
Operating system
No response
Application version
Element Nightly version: 2025012301 Crypto version: Rust SDK 0.8.0 (21f7cc7), Vodozemac 0.8.1
How did you install the app?
No response
Homeserver
No response
Will you send logs?
No
The text was updated successfully, but these errors were encountered: