I found by accident the following entries (every 10-15 minutes) in https:/mynextcloud/settings/admin/logging:
User x still has unscanned files after running background scan,
background scan might be stopped prematurely
Nextcloud version (eg, 20.0.5):
Nextcloud Hub II (23.0.1)
Operating system and version (eg, Ubuntu 20.04):
occ files:scan x --unscanned,
occ files:scan x, but message is still appearing again and again
Can you help me how to fix it and/or advise what’s going wrong here?
Thanks a lot!
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
Also seeing this after an update from 22.2.3 to 22.2.5.
I opened an issue for it: https://github.com/nextcloud/server/issues/31283
Alright, summary for the forum peeps:
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;”
edit: actually is 1 entry 4 times.
fileid storage path path_hash parent name mimetype mimepart size mtime storage_mtime encrypted unencrypted_size etag permissions checksum
108 1 news 508c75c8507a2ae5223dfd2faeb98122 1 news 2 1 -1 1496476044 1496476044 0 0 5932698ce1bfd 31
Danke für die Lösung. Bei mir hat es wunderbar geklappt. Der Fehler ist beseitigt.
Danke für die Lösung.
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
@Talus_Unheil: I ran the following command to delete the rows that match the condition as proposed by @simonspa in this comment:
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
mounts instead of
Query OK, 264 rows affected (0.097 sec)
Thank you very much – that saved me A LOT of time
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.