Like for the old files_locking app, we might want to add a wait loop + delay when acquiring a lock.
Basically if the lock is not available, wait a few milliseconds and try again.
A bit like https://github.com/owncloud/files_locking/blob/master/lib/lock.php#L105
@icewind1991 @DeepDiver1975 @nickvergessen
I'm pretty sure there must be a duplicate but I can't find it now...
In some cases, background jobs that do filesystem operations might lock some folders during their operation. If someone is uploading a huge file, that one will likely fail with 423 Locked.
In fact, it happened to me recently: I uploaded a new 1.5 GB file through Webdav and it took several hours (because my upload speed here sucks...). When it finally reached the final bytes, it failed with 423 Locked.
When looking at the log it appears that some cron jobs were running around the same time.
Especially for such scenarios it would be useful to have a "wait and retry" logic when acquiring locks. If after a specific timeout the lock is still not free, return the 423 Locked error.
@DeepDiver1975 @butonic @guruz @ogoffart @davivel @dragotin does that make sense ?
Another case here: https://github.com/owncloud/core/issues/26896
I was just tired of this and went ahead implementing it here: https://github.com/owncloud/core/pull/28544
Also this is a potential topic for https://github.com/owncloud/core/pull/28253#issuecomment-319058642 but I'm not sure if we should backport this...
Hey, this issue has been closed because the label status/STALE is set and there were no updates for 7 days. Feel free to reopen this issue if you deem it appropriate.
(This is an automated comment from GitMate.io.)
While my experiment failed, we still need a way.
Hey, this issue has been closed because the label status/STALE is set and there were no updates for 7 days. Feel free to reopen this issue if you deem it appropriate.
(This is an automated comment from GitMate.io.)
Please implement this. I get this with demo.owncloud.com in the root directory when uploading a big file (using a single WebDAV PUT, no oC chunking) to remotes.php/wedav.
I don't know the cause or who locked something. Is it related to me using no chunking?
Most helpful comment
In some cases, background jobs that do filesystem operations might lock some folders during their operation. If someone is uploading a huge file, that one will likely fail with 423 Locked.
In fact, it happened to me recently: I uploaded a new 1.5 GB file through Webdav and it took several hours (because my upload speed here sucks...). When it finally reached the final bytes, it failed with 423 Locked.
When looking at the log it appears that some cron jobs were running around the same time.
Especially for such scenarios it would be useful to have a "wait and retry" logic when acquiring locks. If after a specific timeout the lock is still not free, return the 423 Locked error.
@DeepDiver1975 @butonic @guruz @ogoffart @davivel @dragotin does that make sense ?