element-hq / element-hq/dendrite
Permanent high CPU usage while enable_outbound is on
- Dominant language
- Go
- Stars
- 965
- Forks
- 101
- PR merge metrics
- No merged PRs in 30d
Description
*This issue was originally created by [**@IngwiePhoenix**](https://github.com/IngwiePhoenix) at .*
### Background information
- **Dendrite version or git SHA**: 0.12.0
- **SQLite3 or Postgres?**: Postgres
- **Running in Docker?**: No
- **`go version`**: go1.18.1 linux/arm64
- **Client used (if applicable)**:
### Description
- **What** is the problem: As long as `presence.enable_outbound` is enabled, my CPU usage goes through the roof, permanently.
- **Who** is affected: My server
- **How** is this bug manifesting: Very, very high CPU usage.
- **When** did this first appear: After enabling `enable_outbound`
### Steps to reproduce
- In `dendrite.yml` under `presence:`, set `enable_outbound` to `true`.
Here is a 60 second CPU dump that I took according to the FAQ.
[goprof_cpu.txt](https://github.com/matrix-org/dendrite/files/11884110/goprof_cpu.txt)
(added `.txt` so that Github would let me upload this.)
My suspicion is that there are "dead channels". I see that my Telegram bridge can not access a few channels and I suspect that events are sent there errornously. But I have not found a way to just outright delete those channels entirely.
Contributor guide
Assessment
This issue has not been assessed yet.