-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Large amounts of repeated DB queries when using multiple federation sender workers #9113
Comments
Looks like we just noticed this as well -- it should be fixed by #9114. |
the link seems to be broken?
why would the problem in #9114 cause lots of repeated queries (as opposed to a small number of very slow ones)? |
Sorry, I deleted the logs when the issue was closed, in case there was any sensitive info in there I missed. It's back up now. |
Thanks. TL;DR, there is a lot of this stuff going on:
Again I'm not sure that's consistent with #9114 so I'm going to reopen this. [edited, sorry I copied the wrong bit of log initially!] |
Oh, right. This is it just iterating through all the destinations that need to be retried, but since there are multiple federation senders we rapidly chew through the list until we hit destinations we need to retry (I believe). We may want to at some point clear out entries from the list that are e.g. more than a month old, to stop the list just ever increasing. |
Just to clarify how much of this stuff is going, I should add that the |
Yeah, we're seeing this on matrix.org as well. I'm hoping that changing the query means that it goes fast enough that we don't care too much that there are so many of them, but we'll see. |
Hi, just wanted to confirm that this was not related to #9114, and persists after upgrading to 1.26.0. |
#9198 might help this a bit too, although the cause seems a bit different? (Note that that will be in 1.27.0 and requires using workers via Redis). |
This appears to be fixed in 1.27. Thanks a bunch for all your hard work! 😄 |
Description
wake_destinations_needing_catchup
performs massive amounts of repeated SELECT queries when using multiple federation_sender workers. Using a single federation_sender works well.Here are the debug logs from the federation senders, from startup up until the issue starts occuring. I don't think there's any value to providing more of the log, as the output just repeats itself after this point.
The actual destination in the query seems to vary though, I've seen three destinations so far:
toofat.ru
,wc20.tencapsule.com
andfpoe.info
. The output of a sample query with all three destinations follows below:Steps to reproduce
Of course, this is probably specific to me and the contents of my db, so naturally I'll provide any further information as needed. Just let me know! :)
Version information
If not matrix.org:
Version: 1.25 (note: problem occurred on 1.24 as well)
Install method: Via apt from the matrix.org repo
The text was updated successfully, but these errors were encountered: