Scanner locked error when running occ files:scan

What does this error mean?

[root@moorfield003 nextcloud]# sudo -u nginx php --define apc.enable_cli=1 occ files:scan rob.nicholson
Starting scan for user 1 out of 1 (rob.nicholson)
Exception during scan: "files/6574aa9652cde089cc67b9b5ef8a8853"("local::/usr/share/nginx/nextcloud/data/::__groupfolders/1/scanner::") is locked
#0 /data/nextcloud/lib/private/Files/Storage/Common.php(765): OC\Lock\DBLockingProvider->acquireLock()
#1 /data/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php(607): OC\Files\Storage\Common->acquireLock()
#2 /data/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php(607): OC\Files\Storage\Wrapper\Wrapper->acquireLock()
#3 /data/nextcloud/lib/private/Files/Storage/Wrapper/Jail.php(451): OC\Files\Storage\Wrapper\Wrapper->acquireLock()
#4 /data/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php(607): OC\Files\Storage\Wrapper\Jail->acquireLock()
#5 /data/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php(607): OC\Files\Storage\Wrapper\Wrapper->acquireLock()
#6 /data/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php(607): OC\Files\Storage\Wrapper\Wrapper->acquireLock()
#7 /data/nextcloud/lib/private/Files/Cache/Scanner.php(326): OC\Files\Storage\Wrapper\Wrapper->acquireLock()
#8 /data/nextcloud/lib/private/Files/Utils/Scanner.php(256): OC\Files\Cache\Scanner->scan()
#9 /data/nextcloud/apps/files/lib/Command/Scan.php(164): OC\Files\Utils\Scanner->scan()
#10 /data/nextcloud/apps/files/lib/Command/Scan.php(218): OCA\Files\Command\Scan->scanFiles()
#11 /data/nextcloud/3rdparty/symfony/console/Command/Command.php(255): OCA\Files\Command\Scan->execute()
#12 /data/nextcloud/core/Command/Base.php(177): Symfony\Component\Console\Command\Command->run()
#13 /data/nextcloud/3rdparty/symfony/console/Application.php(1009): OC\Core\Command\Base->run()
#14 /data/nextcloud/3rdparty/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand()
#15 /data/nextcloud/3rdparty/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun()
#16 /data/nextcloud/lib/private/Console/Application.php(211): Symfony\Component\Console\Application->run()
#17 /data/nextcloud/console.php(100): OC\Console\Application->run()
#18 /data/nextcloud/occ(11): require_once('/data/nextcloud...')
#19 {main}
+---------+-------+--------+--------------+
| Folders | Files | Errors | Elapsed time |
+---------+-------+--------+--------------+
| 25      | 178   | 1      | 00:00:01     |
+---------+-------+--------+--------------+

Try again with --verbose flag:

sudo -u nginx php --define apc.enable_cli=1 occ files:scan -vvv -- rob.nicholson

then it shows exactly at which file it derails.

It looks like a file is locked, is there a file used by another process?

Hope this helps,
much luck!

Thanks for the comment. Will try later. Yes, I’m lurking around this area because we’ve got 423 errors on the client continually around a file/folder that’s been deleted. So it’s locking…