element-hq / element-hq/synapse
synapse loaded by lots of /federation/v1/event/... requests
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 600
- Avg merge
- 5d 6h
- Merged PRs (30d)
- 46
Description
This issue has been migrated from [#2164](https://github.com/matrix-org/synapse/issues/2164).
---
Every so often, my synapse goes off and spends a couple of hours spinning at 100% CPU. Investigation reveals that it is mostly spending that time processing /federation/v1/event/ requests - basically some other server in the federation starts hammering it for a load of events.
There are two questions here:
* why are other servers hammering it?
* it seems surprisingly expensive to serve the request. The CPU times are quite variable but some of them are over 200ms per request - which takes a while when there are tens of thousands of requests.
Contributor guide
Assessment
This issue has not been assessed yet.