This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
Sync workers get stuck, @cached call blocked by slow @cachedList query #14049
Labels
A-Sync
defects related to /sync
O-Occasional
Affects or can be seen by some users regularly or most users rarely
S-Major
Major functionality / product severely impaired, no satisfactory workaround.
T-Defect
Bugs, crashes, hangs, security vulnerabilities, or other reported issues.
Hard to write title, feel free to change! We're facing a problem where a sync worker will stop processing requires entirely blocked by a call to
get_rooms_for_users(_with_stream_ordering)
. I think what is happening is roughly:get_rooms_for_users
around hereget_rooms_for_user
that is used as part of the regular syncIt seems certain combinations of cache invalidation and request mean every user is included in the cached list call, which in turn blocks all sync requests on that instance until it clears.
The queries are taking minutes to run (and the database is not at max throughput), example:
Some thoughts:
@cached
block if there's a relevant@cachedList
call ongoing?get_rooms_for_users
be batched, currently unbounded?Related: #14037
The text was updated successfully, but these errors were encountered: