Uploading large files error - Filelocking

Nextcloud version : 29.0.2
Operating system and version : Ubuntu 22.04.4 LTS
Apache or nginx version : Apache2 2.4.59
PHP version : 8.2.20

The issue you are facing (with activated file-locking):

Uploading large files fails with error "MOVE url/dav/uploads/USER/web-file-upload-feez62946243t/.file 423 (Locked) (console)

After deactivating file-locking in config.php, the file upload works but a error is still displayed in the GUI (not console).

Is this the first time you’ve seen this error? (Y/N): No, it happens often while uploading large files (larger than about 20GB)

Steps to replicate it:

  1. Uploading files larger than 20GB

The output of your Nextcloud log in Admin > Logging:

<15>Jun 24 13:03:12 MACHINE Nextcloud[4733]: {"reqId":"jJz55ngwRDrXwIJvuVzQ","level":0,"time":"2024-06-24T13:03:12+00:00","remoteAddr":"","user":"USER","app":"webdav","method":"MOVE","url":"/remote.php/dav/uploads/USER/web-file-upload-fee7adc3b6fae059/.file","message":"{\"Exception\":\"OCA\\\\DAV\\\\Connector\\\\Sabre\\\\Exception\\\\FileLocked\",\"Message\":\"\\\"USER/files/LARGE-FILE.upload.part\\\" is locked, existing lock on file: exclusive\",\"Code\":0,\"Trace\":[{\"file\":\"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php\",\

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

'memcache.local' => '\\OC\\Memcache\\APCu',
  'filelocking.enabled' => true,
  'filelocking.ttl' => 43200,
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => '/var/run/redis/redis-server.sock',
    'port' => 0,
    'timeout' => 0.0,

The output of your Apache/nginx/system log in /var/log/____:

no error in apache2/error.log

Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

"Datei konnte nicht hochgeladen werden - Unbekannter Fehler"

We have tried the following things:

  • disabling file-locking → file gets uploaded, but error message in GUI persists

  • disabled chunking (value 0) and increased apache2 header size

  • Apache2 Timeout → Timeout 600 (vhost)
    -SSLRenegBufferSize set to 1048570
    → Upload gets completely stuck after a few minutes

max_input_vars = 100000
max_input_nesting_level = 128
default_socket_timeout = 180
max_execution_time = 10000
max_input_time = 10000
post_max_size = 40000M
upload_max_filesize = 40000M
max_file_uploads = 100

(nano /etc/apache2/apache2.conf)
Timout 2400

chunksize set
sudo -u www-data php occ config:app:set files max_chunk_size --value 104857600

filelocking.ttl": “43200”

Has anyone an idea how to fix this issue?