-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
long-running /search
query on matrix.org after client disconnected
#14290
Comments
Do we know whether the 3.5 hours was all in a single big DB transaction or lots of smaller transactions? |
Looking at synapse/synapse/storage/databases/main/search.py Lines 428 to 545 in 81815e0
|
If I was executing a long-running query in |
There is, according to stackoverflow.
Plumbing everything together is the challenging part. The cancellation has to go from the main thread to the db threadpool thread running the transaction, and there's twisted code in the way. |
I suspect that @erikjohnston's proposed fix in #14402 has resolved this issue, so I shall close it. We'll reopen the issue if we see an excessively slow |
Discovered a long-running
SearchRestServlet
(search text of all rooms) on matrix.org that was running for a user that is only in 21 rooms. But perhaps one of the rooms is large.Logs:
See that the request was processing for ~3.5hrs. There was a spike in DB traffic at the very end of the event as well. Looks like a good endpoint candidate to make cancelable.
The text was updated successfully, but these errors were encountered: