Hello community!
I am trying to upload the whole content from my iphone 11 to my nextcloud server. I am using nextcloud ios app with the option āUpload the whole camera rollā. The content is large (about 150gb) and for 1 day is uploaded only 1.5GB. I am receiving the following error:
āWebDAV Locked: Trying to access locked resourceā
Also i see that is looping some files again and again with the error.
This is the log from my nextcloud server:
OCP\Lock\LockedException: āfiles/34a10310eb76105a324b83861ff02525ā is locked
/var/www/nextcloud/lib/private/Files/Storage/Common.php - line 779:OC\Lock\DBLockingProvider->changeLock(āfiles/34a10 ⦠5ā, 2)
/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php - line 615:OC\Files\Storage\Common->changeLock(ā2017/08/17- ⦠gā, 2, OC\Lock\DBLockingProvider {})
/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php - line 615:OC\Files\Storage\Wrapper\Wrapper->changeLock(ā2017/08/17- ⦠gā, 2, OC\Lock\DBLockingProvider {})
/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php - line 615:OC\Files\Storage\Wrapper\Wrapper->changeLock(ā2017/08/17- ⦠gā, 2, OC\Lock\DBLockingProvider {})
/var/www/nextcloud/lib/private/Files/View.php - line 1968:OC\Files\Storage\Wrapper\Wrapper->changeLock(ā2017/08/17- ⦠gā, 2, OC\Lock\DBLockingProvider {})
/var/www/nextcloud/apps/dav/lib/Connector/Sabre/Node.php - line 392:OC\Files\View->changeLock(ā/iphone11/2 ⦠gā, 2)
/var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php - line 241:OCA\DAV\Connector\Sabre\Node->changeLock(2)
/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 1130:OCA\DAV\Connector\Sabre\File->put(ā*** sensiti ⦠*ā)
/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php - line 513:Sabre\DAV\Server->updateFile(ā*** sensiti ⦠*ā)
Now the application is working fine without errors, but i receive the following warning in nextcloud server site:
There are some warnings regarding your setup.
* Transactional file locking is disabled, this might lead to issues with race conditions. Enable "filelocking.enabled" in config.php to avoid these problems. See the [documentation ā](https://docs.nextcloud.com/server/17/go.php?to=admin-transactional-locking) for more information.
@ttsvetanov I have the exact same problem when syncing a huge ios library despite having no errors or recommendations when being in the instance overview
it was ok for thousands of photos but the ios client started showing those webdav errors when uploading videos
Redis is already helping a lot. The second thing is optimizing the database caches (mysqltuner, tuning-primer.sh). Before you try to synchronise your phone, try to put many small files via Nextcloud desktop client or directly via webdav (client software e.g. winSCP). Check your setting by how many files you can transfer per minute.
I have done this a long time ago, so donāt count to much on the settings and values but it gives you an idea:
But there is something I still donāt understand: despite having activated Redis, there are still thousands of things in the oc_file_locks db table, increasing over time. Itās increasing simply browsing files via the web interface. Isnāt redis supposed to be in charge of locking every files processed by the instance?
I would guess but I donāt know for sure. Iād first check if redis is really working not that there is a connection or permission problem and mysql is still used.
@tflidd Same issue here and I have exhausted all related 423 error pages for potential solutions, and none of them worked (Redis, timeout in php configs, etc, etc).
I believe this topic here is exactly about that issue: WebDAV 423 error with the iOS app.
I believe someone reported the issue a year ago, whiteout any traction either: here
What additional details could we share to help debugging? Happy to do anything useful, even debugging.
My context / config on iOS client app:
nextcloud running in docker on Ubuntu server.
Latest iOS app connected to the server. I activate photo upload and the options are:
FULL history (so not the default that uploads only new photos going forward)
Upload of videos too
Both photos and videos are uploaded on Wifi only.
the iOS app prepares that setup for a couple of minutes, then starts to upload. There is a double arrow icon appearing in the top right corner of the app, tapping on it shows pending uploads.
I can see uploads going through, several files in parallel all the time. Then after a few minutes of the upload process going through, it starts failing some uploads with the infamous 423 error. Files fall into 423, but not all of them. At some point there will be 100 files that fell into 423 error, therefore that upload screen doesnāt show anything else anymore than the 100 first failed uploads. There is a Stop icon on the right of each file name but it does nothing by tapping it. There is not retry icon either (could be a potential fix to get either an automatic retry at some point / a manual one that could be triggered)
I have tried to upload my photos this way 3 times, with different recommended configurations of the nc server to avoid 423. Without success. I tried by starting form scratching, trashing and recreating the user account, with and without server encryption. Nothing fixes or reduces the problem.
Again, happy to contribute additional information or debugging info to help understand and solve the issue.
Whatās happening after a few minutes. I just wonder if there might be a cronjob getting activated and using a lot of resources blocking or slowing down the upload. Not sure how this relates in creating the locks.
How to debug? Logs are interesting but there might be a lot of noise. If you just check the system usage during upload, is there something new popping up when the errors start appearing. Regarding the cronjobs, you might increase the running interval, then it should be easily possible to check if the slow down appears at the same moment the cronjobs start.
Nextcloud/Settings/Advanced/Capabilities: In my case the option lock file is not available (despite having redis as file locking cache). Is this enabled in your case?