element-hq / element-hq/dendrite
cpu usage skyrocketing for no apparent reason
- Dominant language
- Go
- Stars
- 965
- Forks
- 101
- PR merge metrics
- No merged PRs in 30d
Description
### Background information
- **Dendrite version or git SHA**: 0.14.1+40bef6a
- **SQLite3 or Postgres?**: Postgres
- **Running in Docker?**: yes
### Description
Hi, since few days ago my instance cpu usage is skyrocketing with one core at 100% constantly.
Thanks to docker I'm able to mitigate this by limiting the cpus amount I provide to the container.
The weird thing is, afaik, I didn't change the config recently. Also, presence feature is disabled since the beginning (both in/outbound set to false). I have no clue on what could be the root cause.
Restarting/recreating the container (but preserving any volume config and the db) does not help.
No error or warns in the logs.
All I can see is a decent pressure of http calls to
```
/_matrix/client/v3/sync?filter=1&timeout=30000&org.matrix.msc1234.use_state_after=true&set_presence=unavailable&since=blabla
```
Any ideas?
Contributor guide
Research direction
Begin with the /_matrix/client/v3/sync request pattern, the Postgres and Docker setup, and the available logs; compare CPU behavior with presence disabled. Done means identifying a reproducible cause for the sustained single-core usage and documenting a verified fix or mitigation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, go, postgresql
- Domain
- backend, databases, devops, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100