Sorry to hear you’re facing problems
In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:
Or for longer, use three backticks above and below the code snippet:
longer example here
Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can
Nextcloud version (eg, 20.0.5): 25.0.5
Operating system and version (eg, Ubuntu 20.04): Debian Buster, inside docker container (Docker)
Apache or nginx version (eg, Apache 2.4.25): Nginx
PHP version (eg, 7.4):
The issue you are facing:
From time to time (around once a day at least), I notice that the mysql service is at 100% of the cpu. Checking which processes are causing this, I find this query that never ends:
SELECT `path` FROM `oc_filecache` WHERE (`storage` = 18) AND (`size` < 0) ORDER BY `fileid` DESC LIMIT 1
It seems to be triggered by a nextcloud cron job, since it’s running while this is still running:
php7 -f /config/www/nextcloud/cron.php
I usually kill these processes and it goes back to normal, but only for a few hours, as the issue tends to reappear.
I have the app Memories together with Recognize installed and active, so I don’t know if they could be related somehow. A few weeks ago there was a similar problem that was caused by recognize, but they query was different and was already fixed in an update.
Is this the first time you’ve seen this error? (Y/N): N. It has been happening for several days/weeks now.
Steps to replicate it:
- Notice the increased CPU usage.
I didn’t see anything relevant in the logs, but I’d be happy to provide them if necessary.