Habe die Nextcloud 23.0.1 und bei mir tritt der gleiche Warnung im Abstand von 15 min auf.
User X still has unscanned files after running background scan, background scan might be stopped prematurely
this didn’t help for me.
I see 4 odd looking cache entries with “news” as name and path when I run this command “SELECT DISTINCT * FROM oc_filecache AS f INNER JOIN oc_mounts AS m ON m.storage_id = f.storage WHERE size < 0 AND parent > -1;”
Thank you very much. I was looking everywhere for my MariaDB 100% CPU Issue. I was close to finding it when i saw the queries to oc_filecache but didnt know what to do until ive seen the error “unscanned files after running background scan” which brought me here. You have earned my heart.
Hey there! I have a similar problem, but in my case the output of SELECT DISTINCT * FROM oc_filecache AS f INNER JOIN oc_mounts AS m ON m.storage_id = f.storage WHERE size < 0 AND parent > 1; is 285 rows long. Is there a way to automate the DELETE FROM oc_filecache WHERE fileid = <your id> command? Is there something similar to a bashscript possible in mysql?
Sorry for the noobish question and my missing mysql skills
DELETE f FROM filecache AS f INNER JOIN mounts AS m ON m.storage_id = f.storage WHERE size < 0 AND parent > 1;
Also note that in newer NextCloud versions, the table prefix oc_ has been dropped. So filecache instead of oc_filecache and mounts instead of oc_mounts.
I had this problem too but I could not get it working with this solution.
Since tampering with the database furthermore seems risky i decided to delete the entire user.
I get this error, too. If I understand it correctly, the problem lies in an inconsistency because some entries are linked to files that no longer exist.
Shouldn’t there be a consistency check tool directly in the Nextcloud application that rechecks all internal links and corrects them if necessary? Such a tool would of course have to be executable via the GUI so that this troubleshooting can also be carried out in a shared hosting environment without shell access.
i am sorry to say i have the same errors here and would love to Fix it, I inder stand that you have a solution for this but being new to this problem i dont know how to use the commands that you showed he in this group … can to dump it down for me please.
This query will delete all records in oc_filecache where the fileid is one of the fileids selected by the SELECT query.
DELETE FROM oc_filecache
WHERE fileid IN (
SELECT DISTINCT f.fileid
FROM oc_filecache AS f
INNER JOIN oc_mounts AS m ON m.storage_id = f.storage
WHERE size < 0 AND parent > 1
);
Hi I have the same issue. Did your solution work permanently? For me it did not. Cleaning the sql database helps for a bit, but the issue returns again after a short time.
I just upgraded to NC 29.1.4.1 from NC 28 and noticed this in the logs, though I am pretty sure the issue existed in NC28 too, I just didn’t have the loglevel at warning.