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

Element-web's change to sync based presence breaks synapse process #16039

@MTRNord

Description

@MTRNord

Description

Prior issue over at element-web which has been closed as being a synapse issue rather than element-web's: element-hq/element-web#25874

Since element-web switched to doing presence using /sync vs using the presence API my synapse is using extremely high amounts of CPU due to presence requests happening. It also seems to kill both fed senders from the amount of work they have to do (I assume it is just the metrics endpoint timing out since kubernetes doesnt see them as broken).

image
image

The suspicion it being caused by the element-web change is because the peaks align perfectly with the time I start my element-web clients.

Steps to reproduce

  • I believe just opening develop.element.io is enough.

Homeserver

matrix.midnightthoughts.space

Synapse Version

{"server_version":"1.87.0","python_version":"3.11.4"}

Installation Method

Docker (matrixdotorg/synapse)

Database

Postgresql 15 server with active + standby replication nodes

Workers

Single process

Platform

The server is running on a mixed arch (x86_64+arm64) kubernetes cluster.

Configuration

The config is at https://git.nordgedanken.dev/kubernetes/gitops/src/branch/main/apps/production/synapse-midnightthoughts.yaml#L30-L41 mainly there are 4 (3 non working) appservices

Relevant log output

Attached as a file as the log is too long for a comment

Anything else that would be useful to know?

There is an element-web rageshake available hooked to the other issue.

The pasted log is the last hour. Specifically interesting is the high amount of replication around presence_set_state.

Metadata

Metadata

Assignees

No one assigned

    Labels

    O-FrequentAffects or can be seen by most users regularly or impacts most users' first experienceS-MinorBlocks non-critical functionality, workarounds exist.T-DefectBugs, crashes, hangs, security vulnerabilities, or other reported issues.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions