I was not able to find the source of the problems.
But I’ve run this query to delete all unwanted records in oc_filecache
DELETE f1
FROM oc_filecache f1
JOIN (
SELECT MAX(f2.fileid) AS max_fileid, f2.path_hash, f2.parent
FROM oc_filecache f2
GROUP BY f2.path_hash, f2.parent ) AS subquery
ON f1.path_hash = subquery.path_hash
AND f1.parent = subquery.parent
AND f1.fileid < subquery.max_fileid
AND f1.path like 'files/%';
I’ve deleted records in the oc_filecache of files that are no longer on the disk.
and I’ve turned off all caching of Nextcloud. I did this because I want to make it simpler (just database and filesystem, not the cache doing things). Next week I will turn it on again.
For now, it seems to work. Users need a little more patience. Even the filesync to Windows works (upgraded to the latest client to make sure)