Nextcloud AIO File Scan fails

Hi,

i tried to do a file scan, but if i do that, i get a:

Exception during scan: File entry could not be inserted but could also not be selected with getId() in order to perform an update. Please try again.
#0 /var/www/html/lib/private/Files/Cache/Scanner.php(287): OC\Files\Cache\Cache->insert('files/123.md', Array)
#1 /var/www/html/lib/private/Files/Cache/Scanner.php(220): OC\Files\Cache\Scanner->addToCache('files/123.md', Array, -1)
#2 /var/www/html/lib/private/Files/Cache/Scanner.php(436): OC\Files\Cache\Scanner->scanFile('files/123.md', 3, 239, false, true, Array)
#3 /var/www/html/lib/private/Files/Cache/Scanner.php(382): OC\Files\Cache\Scanner->handleChildren('files', true, 3, 239, true, 8258)
#4 /var/www/html/lib/private/Files/Cache/Scanner.php(385): OC\Files\Cache\Scanner->scanChildren('files', true, 3, 239, true)
#5 /var/www/html/lib/private/Files/Cache/Scanner.php(333): OC\Files\Cache\Scanner->scanChildren('', true, 3, 234, true, Array)
#6 /var/www/html/lib/private/Files/Utils/Scanner.php(256): OC\Files\Cache\Scanner->scan('', true, 3)
#7 /var/www/html/apps/files/lib/Command/Scan.php(164): OC\Files\Utils\Scanner->scan('/test.user', true, NULL)
#8 /var/www/html/apps/files/lib/Command/Scan.php(218): OCA\Files\Command\Scan->scanFiles('test.user', '/test.user', false, Object(Symfony\Component\Console\Output\ConsoleOutput), false, true, false)
#9 /var/www/html/3rdparty/symfony/console/Command/Command.php(255): OCA\Files\Command\Scan->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 /var/www/html/core/Command/Base.php(177): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#11 /var/www/html/3rdparty/symfony/console/Application.php(1009): OC\Core\Command\Base->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#12 /var/www/html/3rdparty/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand(Object(OCA\Files\Command\Scan), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#13 /var/www/html/3rdparty/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#14 /var/www/html/lib/private/Console/Application.php(211): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#15 /var/www/html/console.php(100): OC\Console\Application->run()
#16 /var/www/html/occ(11): require_once('/var/www/html/c...')
#17 {main}

Redis Cache i already flushed, but it didnt solve the problem.
I also restart containers, restart host, check permissions, check user rights on filesystem.
how can i access the database to delete filecache and lock entries?
I didnt find any documentation on the github site.

Thanks

Did you try just running it again? Anything special about this file?

Are you running the scan because you’re adding files externally?

Are you running the scan because you’re adding files externally?

Yes i migrated the Data from the old Cloud to the new Datafolder.

It wont work over 3 Days. All users needed to sync own data. they now need long time to migrate, cause i cant copy…