Problem uploading large files (LOCKED)

As long as I’m using Nextcloud (and I started using nc 12), I’m facing the problem with uploading large (>500 Mbit) files from the desktop client. The client always fails with a 423 LOCKED message.

I gathered some of my apache logfile (anonomized), see below.

We can see that it uploads the parts perfectly and then tries to move the file into the correct location which fails with a HTTP 423 status message (file locked). The MOVE operation is retried a few times (failed again) and then the upload parts are DELETEd without the final being moved in the users tree.

This issue has been posted a few times before, but never came to a proper solution.

I believe the problem is twofold:

  1. The server must be fixed, so the locking issue does not occur. I do not know if there is a stale lock, or the client is too fast with the move operation, before the file is ready (reasambled???)

  2. The desktop client should not remove the uploaded parts if moving the file fails, but should retry the operation after some time.

I would greatly appreciate it, if somebody could shed a light on this and fix this problem permanently.

Kind regards,

Frank


Log details:

domain.com aaa.bbb.ccc.ddd - user [05/Feb/2021:15:51:54 +0100] “MKCOL /remote.php/dav/uploads/user/1936062920 HTTP/1.1” 201 - “-” “Mozilla/5.0 (Windows) mirall/3.1.2stable-Win64 (build 20210128) (Nextcloud)” 1404 4315 aaa.bbb.ccc.ddd:53205 -> www.xxx.yyy.zzz:443
domain.com aaa.bbb.ccc.ddd - user [05/Feb/2021:15:51:54 +0100] “PUT /remote.php/dav/uploads/user/1936062920/00000000 HTTP/1.1” 201 - “-” “Mozilla/5.0 (Windows) mirall/3.1.2stable-Win64 (build 20210128) (Nextcloud)” 100135101 915 aaa.bbb.ccc.ddd:53205 -> www.xxx.yyy.zzz:443
domain.com aaa.bbb.ccc.ddd - user [05/Feb/2021:15:52:18 +0100] “PUT /remote.php/dav/uploads/user/1936062920/00000001 HTTP/1.1” 201 - “-” “Mozilla/5.0 (Windows) mirall/3.1.2stable-Win64 (build 20210128) (Nextcloud)” 100135109 915 aaa.bbb.ccc.ddd:53205 -> www.xxx.yyy.zzz:443
domain.com aaa.bbb.ccc.ddd - user [05/Feb/2021:15:52:42 +0100] “PUT /remote.php/dav/uploads/user/1936062920/00000002 HTTP/1.1” 201 - “-” “Mozilla/5.0 (Windows) mirall/3.1.2stable-Win64 (build 20210128) (Nextcloud)” 100135109 915 aaa.bbb.ccc.ddd:53205 -> www.xxx.yyy.zzz:443
domain.com aaa.bbb.ccc.ddd - user [05/Feb/2021:15:53:02 +0100] “PUT /remote.php/dav/uploads/user/1936062920/00000003 HTTP/1.1” 201 - “-” “Mozilla/5.0 (Windows) mirall/3.1.2stable-Win64 (build 20210128) (Nextcloud)” 100135109 915 aaa.bbb.ccc.ddd:53205 -> www.xxx.yyy.zzz:443
domain.com aaa.bbb.ccc.ddd - user [05/Feb/2021:15:53:20 +0100] “PUT /remote.php/dav/uploads/user/1936062920/00000004 HTTP/1.1” 201 - “-” “Mozilla/5.0 (Windows) mirall/3.1.2stable-Win64 (build 20210128) (Nextcloud)” 100135109 915 aaa.bbb.ccc.ddd:53205 -> www.xxx.yyy.zzz:443
domain.com aaa.bbb.ccc.ddd - user [05/Feb/2021:15:53:30 +0100] “PUT /remote.php/dav/uploads/user/1936062920/00000005 HTTP/1.1” 201 - “-” “Mozilla/5.0 (Windows) mirall/3.1.2stable-Win64 (build 20210128) (Nextcloud)” 100135109 915 aaa.bbb.ccc.ddd:53205 -> www.xxx.yyy.zzz:443
domain.com aaa.bbb.ccc.ddd - user [05/Feb/2021:15:53:38 +0100] “PUT /remote.php/dav/uploads/user/1936062920/00000006 HTTP/1.1” 201 - “-” “Mozilla/5.0 (Windows) mirall/3.1.2stable-Win64 (build 20210128) (Nextcloud)” 100135109 915 aaa.bbb.ccc.ddd:53205 -> www.xxx.yyy.zzz:443
domain.com aaa.bbb.ccc.ddd - user [05/Feb/2021:15:53:47 +0100] “PUT /remote.php/dav/uploads/user/1936062920/00000007 HTTP/1.1” 201 - “-” “Mozilla/5.0 (Windows) mirall/3.1.2stable-Win64 (build 20210128) (Nextcloud)” 100135109 915 aaa.bbb.ccc.ddd:53205 -> www.xxx.yyy.zzz:443
domain.com aaa.bbb.ccc.ddd - user [05/Feb/2021:15:53:55 +0100] “PUT /remote.php/dav/uploads/user/1936062920/00000008 HTTP/1.1” 201 - “-” “Mozilla/5.0 (Windows) mirall/3.1.2stable-Win64 (build 20210128) (Nextcloud)” 100135109 915 aaa.bbb.ccc.ddd:53205 -> www.xxx.yyy.zzz:443
domain.com aaa.bbb.ccc.ddd - user [05/Feb/2021:15:54:03 +0100] “PUT /remote.php/dav/uploads/user/1936062920/00000009 HTTP/1.1” 201 - “-” “Mozilla/5.0 (Windows) mirall/3.1.2stable-Win64 (build 20210128) (Nextcloud)” 100135109 915 aaa.bbb.ccc.ddd:53205 -> www.xxx.yyy.zzz:443
domain.com aaa.bbb.ccc.ddd - user [05/Feb/2021:15:54:11 +0100] “PUT /remote.php/dav/uploads/user/1936062920/00000010 HTTP/1.1” 201 - “-” “Mozilla/5.0 (Windows) mirall/3.1.2stable-Win64 (build 20210128) (Nextcloud)” 20902975 915 aaa.bbb.ccc.ddd:53205 -> www.xxx.yyy.zzz:443
domain.com aaa.bbb.ccc.ddd - user [05/Feb/2021:16:00:04 +0100] “PROPFIND /remote.php/dav/uploads/user/1936062920 HTTP/1.1” 207 355 “-” “Mozilla/5.0 (Windows) mirall/3.1.2stable-Win64 (build 20210128) (Nextcloud)” 1026 1279 aaa.bbb.ccc.ddd:53561 -> www.xxx.yyy.zzz:443
domain.com aaa.bbb.ccc.ddd - user [05/Feb/2021:16:00:04 +0100] “MOVE /remote.php/dav/uploads/user/1936062920/.file HTTP/1.1” 423 381 “-” “Mozilla/5.0 (Windows) mirall/3.1.2stable-Win64 (build 20210128) (Nextcloud)” 1200 1121 aaa.bbb.ccc.ddd:53561 -> www.xxx.yyy.zzz:443
domain.com aaa.bbb.ccc.ddd - user [05/Feb/2021:16:06:59 +0100] “PROPFIND /remote.php/dav/uploads/user/1936062920 HTTP/1.1” 207 355 “-” “Mozilla/5.0 (Windows) mirall/3.1.2stable-Win64 (build 20210128) (Nextcloud)” 1026 1279 aaa.bbb.ccc.ddd:53757 -> www.xxx.yyy.zzz:443
domain.com aaa.bbb.ccc.ddd - user [05/Feb/2021:16:06:59 +0100] “MOVE /remote.php/dav/uploads/user/1936062920/.file HTTP/1.1” 423 381 “-” “Mozilla/5.0 (Windows) mirall/3.1.2stable-Win64 (build 20210128) (Nextcloud)” 1200 1121 aaa.bbb.ccc.ddd:53757 -> www.xxx.yyy.zzz:443
domain.com aaa.bbb.ccc.ddd - user [05/Feb/2021:16:07:15 +0100] “PROPFIND /remote.php/dav/uploads/user/1936062920 HTTP/1.1” 207 355 “-” “Mozilla/5.0 (Windows) mirall/3.1.2stable-Win64 (build 20210128) (Nextcloud)” 1623 4861 aaa.bbb.ccc.ddd:53770 -> www.xxx.yyy.zzz:443
domain.com aaa.bbb.ccc.ddd - user [05/Feb/2021:16:07:15 +0100] “MOVE /remote.php/dav/uploads/user/1936062920/.file HTTP/1.1” 423 381 “-” “Mozilla/5.0 (Windows) mirall/3.1.2stable-Win64 (build 20210128) (Nextcloud)” 1200 1121 aaa.bbb.ccc.ddd:53770 -> www.xxx.yyy.zzz:443
domain.com aaa.bbb.ccc.ddd - user [05/Feb/2021:16:07:24 +0100] “DELETE /remote.php/dav/uploads/user/1936062920 HTTP/1.1” 204 - “-” “Mozilla/5.0 (Windows) mirall/3.1.2stable-Win64 (build 20210128) (Nextcloud)” 1357 4259 aaa.bbb.ccc.ddd:53778 -> www.xxx.yyy.zzz:443

The error is that the file is locked. Do you handle the locking with redis?
https://docs.nextcloud.com/server/stable/admin_manual/configuration_server/caching_configuration.html

Why is it locking? Not sure, but your overall performance will increase with the caching…

Yes, redis is configured.

Is there a critical file size where it starts to fail? Exactly 500MB? Where is the temporary folder for uploads, to what size is this limited?

No, I just mean large files, not exactly 500 MByte and no limits or capacity problems on the temporarily folders.