Uploadet file is locked

Hi and sorry for my bad english.

I tried to upload a big file (132MB) to Nextcloud (using: client).

The file is locked, what can I do? What is the problem?`

Exception: {“Message”:“HTTP/1.1 423 “ONO/TN Q3 ONO 2016 Denise.xlsx” is locked”,“Exception”:“OCA\DAV\Connector\Sabre\Exception\FileLocked”,“Code”:0,“Trace”:"#0 /var/www/htdocs/smart1/html/cloud/sync/apps/dav/lib/Connector/Sabre/File.php(491): OCA\DAV\Connector\Sabre\File->convertToSabreException(Object(OCP\Lock\LockedException))\n#1 /var/www/htdocs/smart1/html/cloud/sync/apps/dav/lib/Connector/Sabre/File.php(104): OCA\DAV\Connector\Sabre\File->createFileChunked(Resource id #79)\n#2 /var/www/htdocs/smart1/html/cloud/sync/apps/dav/lib/Connector/Sabre/Directory.php(137): OCA\DAV\Connector\Sabre\File->put(Resource id #79)\n#3 /var/www/htdocs/smart1/html/cloud/sync/3rdparty/sabre/dav/lib/DAV/Server.php(1036): OCA\DAV\Connector\Sabre\Directory->createFile(‘TN Q3 ONO 2016 …’, Resource id #79)\n#4 /var/www/htdocs/smart1/html/cloud/sync/3rdparty/sabre/dav/lib/DAV/CorePlugin.php(523): Sabre\DAV\Server->createFile(‘ONO/TN Q3 ONO 2…’, Resource id #79, NULL)\n#5 [internal function]: Sabre\DAV\CorePlugin->httpPut(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))\n#6 /var/www/htdocs/smart1/html/cloud/sync/3rdparty/sabre/event/lib/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\n#7 /var/www/htdocs/smart1/html/cloud/sync/3rdparty/sabre/dav/lib/DAV/Server.php(459): Sabre\Event\EventEmitter->emit(‘method:PUT’, Array)\n#8 /var/www/htdocs/smart1/html/cloud/sync/3rdparty/sabre/dav/lib/DAV/Server.php(248): Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))\n#9 /var/www/htdocs/smart1/html/cloud/sync/apps/dav/appinfo/v1/webdav.php(60): Sabre\DAV\Server->exec()\n#10 /var/www/htdocs/smart1/html/cloud/sync/remote.php(165): require_once(’/var/www/htdocs…’)\n#11 {main}",“File”:"/var/www/htdocs/smart1/html/cloud/sync/apps/dav/lib/Connector/Sabre/File.php",“Line”:547,“User”:“david.simon”}

I also had that once. I just remember, that I needed to delete the entry in the locking table of the mysql database manually.

This seems to be the right solution:

If your cron jobs are working properly you can also check, if the lock is going away automatically after 1 hour.

1 Like

I hit the same problem before, and solved by re-scanning the NextCloud files. Just:

cd /var/www/nextcloud
sudo -u nginx php occ files:scan --all

         ↳ i'm using Nginx and the nextcloud owner is "nginx", you should use yours.