Big file is locked after upload, no upload, redis used, update to 12.0.1

i have spend days of time to solv this Problem… there is no solution.

Nextcloud version: 11.0.3
Operating system and version: Debian 9.1 64bit
Apache version: Apache 2.4.25
PHP version: 7.0.19
Is this the first time you’ve seen this error?: No

Can you reliably replicate it? (If so, please outline steps):

If i upload via webinterface a big file, i got the error. Smaller files (816MB) have no problem. The file from the error have 1,3G. Same error with a new file with 957MB.

The output of your Nextcloud log in Admin > Logging:

Fatal	webdav	OCA\DAV\Connector\Sabre\Exception\FileLocked: HTTP/1.1 423 "path\video.avi" is locked

    /var/www/html/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php - line 137: OCA\DAV\Connector\Sabre\File->put(Resource id #31)
    /var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 1072: OCA\DAV\Connector\Sabre\Directory->createFile('video...', Resource id #31)
    /var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php - line 525: Sabre\DAV\Server->createFile('path/video...', Resource id #31, NULL)
    [internal function] Sabre\DAV\CorePlugin->httpPut(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
    /var/www/html/nextcloud/3rdparty/sabre/event/lib/EventEmitterTrait.php - line 105: call_user_func_array(Array, Array)
    /var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 479: Sabre\Event\EventEmitter->emit('method PUT', Array)
    /var/www/html/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 254: Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
    /var/www/html/nextcloud/apps/dav/appinfo/v1/webdav.php - line 60: Sabre\DAV\Server->exec()
    /var/www/html/nextcloud/remote.php - line 165: require_once('/var/www/html/n...')

The output of your config.php file in /path/to/nextcloud:

$CONFIG = array (
  'instanceid' => 'oc4fd360fe32',
  'passwordsalt' => 'xxxxxxxxxxxxxxxxxxxxxxxxxx',
  'trusted_domains' =>
  array (
    0 => '',
    1 => '',
  'datadirectory' => '/var/www/html/nextcloud/data',
  'overwrite.cli.url' => '',
  'dbtype' => 'mysql',
  'version' => '',
  'installed' => true,
  'theme' => '',
  'maintenance' => false,
  'secret' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
  'mail_from_address' => 'nextcloud',
  'mail_smtpmode' => 'php',
  'mail_domain' => '',
  'appstore.experimental.enabled' => true,
  'loglevel' => 2,
  'trashbin_retention_obligation' => 'auto',
  'updatechecker' => true,
  'ldapIgnoreNamingRules' => false,
  'htaccess.RewriteBase' => '/cloud',
  'dbname' => 'nextcloud',
  'dbhost' => '',
  'dbuser' => 'nextcloud',
  'dbpassword' => 'xxxxxxxxxxxxxxxxxx',
  '' => 'stable',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => 'localhost',
    'port' => 6379,


<IfModule mod_php7.c>
  php_value upload_max_filesize 20511M
  php_value post_max_size 20511M
  php_value memory_limit 512M
  php_value mbstring.func_overload 0
  php_value default_charset 'UTF-8'
  php_value output_buffering 0
  <IfModule mod_env.c>
    SetEnv htaccessWorking true

Info from webinterface:

Version: 7.0.19
Memory Limit: 512.0 MB
Max Execution Time: 3600
Upload max size: 20.0 GB

Type: mysql
Version: 10.1.23
Size: 5.6 MB

Any ideas?

Sorry, forget the app:list output:

root@example /var/www/html/nextcloud # sudo -u www-data php occ app:list
  - activity: 2.4.1
  - admin_audit: 1.1.0
  - bookmarks: 0.10.1
  - calendar: 1.5.3
  - comments: 1.1.0
  - contacts: 1.5.3
  - dav: 1.1.1
  - federatedfilesharing: 1.1.1
  - federation: 1.1.1
  - files: 1.6.1
  - files_pdfviewer: 1.0.1
  - files_retention: 1.0.1
  - files_sharing: 1.1.1
  - files_texteditor: 2.2
  - files_trashbin: 1.1.0
  - files_versions: 1.4.0
  - files_videoplayer: 1.0.0
  - firstrunwizard: 2.0
  - gallery: 16.0.0
  - logreader: 2.0.0
  - lookup_server_connector: 1.0.0
  - nextcloud_announcements: 1.0
  - notifications: 1.0.1
  - password_policy: 1.1.0
  - provisioning_api: 1.1.0
  - serverinfo: 1.1.1
  - sharebymail: 1.0.1
  - survey_client: 0.1.5
  - systemtags: 1.1.3
  - templateeditor: 0.2
  - theming: 1.1.1
  - twofactor_backupcodes: true
  - updatenotification: 1.1.1
  - workflowengine: 1.1.1
  - encryption
  - external
  - files_accesscontrol
  - files_automatedtagging
  - files_external
  - user_external
  - user_ldap
  - user_saml
root@example /var/www/html/nextcloud #

And its enough space free: 2T available

And redis is running:

root@example /var/www/html/nextcloud # ps ax|grep redis
12687 ?        Ssl    5:15 /usr/bin/redis-server
16259 pts/7    S+     0:00 grep redis
root@example /var/www/html/nextcloud #


Maybe its because the data dir changed from


But i have change the path in der config.php?

‘datadirectory’ => ‘/var/www/html/nextcloud/data’,

edit Update to NC 12.0.1, same problem. “Verwaltung” (Adminpage) and log shows no errors (except the “file locked”).

edit 2 I know this side:
I have clear the table oc_file_locks, but its the same problem.

edit 3 if i set “‘filelocking.enabled’ => false,”, everything works well.

edit 4 if i upload a file with curl, same error.

Did you set the LimitRequestBody and SSLRenegBufferSize in your apache configuration?

Your configuration looks good, could be a problem with moving the data folder. Do you still see the old path in the database? oc_storages or oc_filecache?

You already use Redis as a memcache, did you also set it as a locking mechanism in config.php?

1 Like

Hey, thank you very much for your reply. I have some virus-problems in my company so my answer is a little bit later, sorry.

tflidd: LimitRequestBody and SSLRenegBufferSize is not set (grep -r …)
I have no table called “oc_storages”, but “oc_filcache”. I cant find something like the old path. Just “files/…” or “username/files/…”. Some path’s have “files/SHAREDFOLDER/…”, without username?

alfred:i have delete the redis section in my config.php. Now i have just " ‘memcache.local’ => ‘\OC\Memcache\APCu’," but it’s the same problem.

On a second server, also debian 9 but with NC 11.0.3 (and redis), i have the same problem.

I have disable the apache2 config “reqtimeout.conf” with RequestReadTimeout and RequestReadTimeout, same problem.

Maybe a new option in Debian 9? Have someone Debian 9 with NC and can upload a 1GB file?

And if i upload a bigger file with Curl:

curl -u user:pass -T bigfile.mkv ""
<?xml version="1.0" encoding="utf-8"?>

<d:error xmlns:d=“DAV:” xmlns:s=“”>
<s:message>“test/bigfile.mkv” is locked</s:message>

These problems happen exactly if you don’t use Redis for locking. I can upload huge files using the web UI (10GB are no problem) on a Debian 9 system with a LAMP stack and Nextcloud 12.

The link above about transactional file locking and this howto should help you configure it:

Hello everyone,

I’ve exact the same issue. It looks like a problem regarding the upload time. When I upload a 4 GB file in 9 minutes over a strong connection it works fine. But when I have a slower connection f.e. 2.5 GB in 70 minutes he is uploading the complete file, the popup “Blocked” appears and the upload is lost. It happens on my server at release 12.0.3., 12.0.6 and 13.0.0. Does somebody know someting about 60 minutes limitations? Whats about the admin page under “Administator > Informations > PHP > Maximum exection time: 3600”? How can I extend it?

Thanks for response and sry about reopening the old thread!+

Kind regards

Hello ASE,

my problem exists too. I have search weeks and weeks and found: no solution. You can change the max_execution_time in your php.ini:

; Resource Limits ;

; Maximum execution time of each script, in seconds
; Note: This directive is hardcoded to 0 for the CLI SAPI
max_execution_time = 30

I found no option in the .htaccess for this option, but nextcloud show a 3600?

Maybe, this is not the right place to hope for help. Maybe, is a better place…

And mean you “blocked” or “locked”?? its a big difference.

Hello BurtGummer,

of course I mean locked. Thanks for that hint! I tested last night and my behaviour looks similar to yours. I have done a lot modifications in the php.ini (output_buffering, post_max_size, upload_max_filesize, default_socket_timeout and session.cache.expire) and in .htaccess (php_value memory_limit, php_value max_input_time and php_value max_execution_time), but the only way to solve this problem was to set " ‘filelocking.enabled’ => false," in config.php. For me it’s just a workaround, but the customer can upload now files also over 2.5 hours (tested last night). Does your Nextcloud-Data lie on the same machine as the server, or did you attached a share like SMB/NFS/ISCSI? My Data lies on a mounted SMB share.

About max_execution_time… It was set to 21600 (6h) on my machine, but in admin page it’s still 3600 showen, Even after services and server restart.

Hello ASE,

“‘filelocking.enabled’ => false” is also my last way to solve this problem.
My data-dir is in the nextcloud-path on the same machine (/var/www/html/nextcloud/data/).

I really have no idea anymore.

Hello BurtGummer,

I don’t know if it’s allowed to post here links to another websites. I’ve created a new issue on Github.

Thanks for your help and the fast response on!