Skip to content
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

Constantly flashing online status alternately. #25900

Closed
YamatoRyou opened this issue Aug 2, 2023 · 14 comments
Closed

Constantly flashing online status alternately. #25900

YamatoRyou opened this issue Aug 2, 2023 · 14 comments
Labels

Comments

@YamatoRyou
Copy link

YamatoRyou commented Aug 2, 2023

Steps to reproduce

n/a

Outcome

What did you expect?

n/a

What happened instead?

Since 1.11.37, this problem occurs when the other party is online. It disappears when the other party exits the application (not logout).

The specific performance is shown in the figure, and the Web/desktop version will appear.
{33E0DE87-909A-7995-0C74-417FC32CC52B}

Operating system

x64 Windows 11

Browser information

Chromium 102.0.5005.167

URL for webapp

No response

Application version

Element Web: b404d2d-react-89a92c6351a4-js-88ba4fad716a, Element Desktop: 1.11.37

Homeserver

Synapse 1.89.0

Will you send logs?

No

@stanclai
Copy link

stanclai commented Aug 2, 2023

I guess, it's a part of more complex behavior. Yesterday, after the 1.11.37 release, I've noticed abrupt increase in nginx load caused by matrix users requests flood (subjectively it felt kind of DDoS). At the same time synapse metrics showed increase in presence events frequency. After I've turned off presence support in synapse config file, requests flood stopped.

Edit: Such behavior was reproduced with Synapse versions 1.84.1 and 1.89.0 with presence feature turned on. After the feature was turned off, all went quiet. Before yesterday the situation was quite normal. So it's logical to suppose that something was changed in Element v1.11.37, that triggered such behavior.

@davidegirardi
Copy link

Related to matrix-org/synapse#15824? Disabling presence made the "spamming" of sync requests calm down.

@t3chguy
Copy link
Member

t3chguy commented Aug 2, 2023

Related matrix-org/synapse#16039

@t3chguy
Copy link
Member

t3chguy commented Aug 2, 2023

Possibly related matrix-org/synapse#15082 and matrix-org/synapse#12424

@t3chguy
Copy link
Member

t3chguy commented Aug 2, 2023

Element Web/Desktop in v1.11.37 switched from the PUT /presence API which clobbered other clients and broke status messages to /sync set_presence param which the spec describes as offering per-client (not per-user) presence

Controls whether the client is automatically marked as online by polling this API. If this parameter is omitted then the client is automatically marked as online when it uses this API. Otherwise if the parameter is set to “offline” then the client is not marked as being online when it uses this API. When set to “unavailable”, the client is marked as being idle.

It seems like Synapse may be implementing this poorly

@QEDeD
Copy link

QEDeD commented Aug 2, 2023

also relevant and has the next month milestone: matrix-org/synapse#15980

@karolyi
Copy link

karolyi commented Aug 2, 2023

It is reproducible with two element-web clients, one being online while the other being away. They constantly keep switching the presence status back and forth.

It also results in a bigger server load as synapse doesn't take it well.

@t3chguy
Copy link
Member

t3chguy commented Aug 3, 2023

@karolyi are both clients in that situation up to date (1.11.37?) - the old behaviour of PUT /presence clobbered the presence of all your other devices so it wouldn't surprise me if mixing versions would cause this.

@karolyi
Copy link

karolyi commented Aug 3, 2023

@t3chguy yes they are. I'm on my own latest element-web instance with both clients.

@t3chguy
Copy link
Member

t3chguy commented Aug 3, 2023

Thanks @karolyi - reproduced it locally and it is a Synapse bug - opened matrix-org/synapse#16057 instead of this issue

@t3chguy t3chguy closed this as completed Aug 3, 2023
@visubesy
Copy link

This bug occurs again since the last update of Element (1.11.55). The server software hasn't been updated: matrix-synapse (1.95.1-1~bpo12+1; Debian bookworm-backports).
Please reopen this issue.

@t3chguy
Copy link
Member

t3chguy commented Jan 22, 2024

There have been 0 changes to presence, Synapse 1.95 is outdated, I suggest updating to 1.98 and if it recurs opening your own issue with logs from all running clients (for the impacted user account) and from the server.

@visubesy
Copy link

There have been 0 changes to presence, Synapse 1.95 is outdated, I suggest updating to 1.98 and if it recurs opening your own issue with logs from all running clients and from the server.

OK, I disabled presence on Synapse for now to workaround the high CPU load on Synapse caused by the flashing presence. I'm going to update Synapse to 1.98 as soon as it is available via Debian bookworm-backports.

@jlemangarin
Copy link

Still HARD flooding the browser and the server
1.98.0

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

No branches or pull requests

8 participants