Unusably slow server, timeouts - seems related to mounts

I love Nextcloud and use my home server constantly. I’m running into a brutal performance issue and I’m hoping someone might have ideas on how to work around the problem until I can properly debug it or a fix is released.

The main symptoms are very slow HTTP response times from the web UI, slow WebDAV responses, and timeouts from desktop and mobile clients (they show the server as “offline”).

I don’t see anything useful in the logs, but when I run show processlist in MariaDB over and over I see many INSERT and DELETE statements running against the oc_mounts table.

I’ve tried restarting the server (destroying and re-creating Docker containers), disabling apps like External storages support, Talk, Activity, and Full text search, killing the cron job, and killing my elasticsearch server. None of these attempts have helped.

It is in the issue tracker here:

Possibly related:

Interesting, the bout of slowness (as well as the excessive INSERTs and DELETEs) stopped after a few hours. My server is back to normal: lightning fast web UI, WebDAV. Desktop and mobile clients are happy (not timing out). Maybe there’s some periodic (weekly?) Nextcloud clean-up job gone awry?