-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
synapse_forward_extremities metric appears to have no rooms in it for periods of time #8792
Comments
That's a bit odd, is this new behavior or has it been going on for a while? Note that this value is only updated every 60 minutes (updated by the |
The graphs I have access to only go back 30 days. I believe I can see this behaviour going on for the whole of that period, but it is difficult to tell |
Assuming this isn't due to performance or configuration changes, the only way I could see this being possible is if the query for this metric returning zero rows: synapse/synapse/storage/databases/main/metrics.py Lines 66 to 89 in 437a99f
Handing @benbz is the |
One thing I will say is that all the examples I saw in the last 48 hours seem to correspond to a server restart. And metrics only start being non-zero an hour later. I can't confirm/deny whether the historical ones all relate to a server restart |
Aha! Well that bucket won't be updated until at least 1 hour has passed since the server has started up, so on any scrape in the meantine we'd see 0's. One solution is to just call the function immediately, and then again every 1hr. Looks like we actually do this already for some metrics: synapse/synapse/app/phone_stats_home.py Lines 175 to 177 in fe0f4a3
|
It might be a bit annoying to have to call that relatively expensive query during startup. can we instead just not emit the metric until the query has run? |
So it appears like Synapse is reporting there are 0 rooms with <= Infinity Forward Extremities. This appears to happen semi-regularly
The text was updated successfully, but these errors were encountered: