matrix-org / dendrite

Dendrite is a second-generation Matrix homeserver written in Go!
https://matrix-org.github.io/dendrite/
Apache License 2.0
5.67k stars 664 forks source link

Messages take more than a minute to appear to be sent by the client #1635

Closed fbushstone closed 3 years ago

fbushstone commented 3 years ago

I'm using dendrite.matrix.org (so no logs).

Sometimes, messages take more than a minute to be sent by (or appear to be sent by) the client. Sometimes they send fairly quickly. As such, there's no way to reproduce the bug, other than the fact that there are "slowness spikes". Generally this happens in big rooms but it has also happened in smaller rooms as well. Dendrite.matrix.org used to be fast all the time but that is no longer the case with these "slowness spikes".

neilalexander commented 3 years ago

It seems that this happens when a large room hasn't seen any outbound activity recently, so I suspect that this is to do with starting up all the destination queues when sending events. It doesn't appear to happen on subsequent events after the first one for me.

fbushstone commented 3 years ago

When testing it out in large rooms like Techlore, it seems that it does happen on subsequent events for me. Where in the code do you think it's happening?

fbushstone commented 3 years ago

Performance has been pretty good since January. I shouldn't have left this issue open for so long.