How to avoid locked files for a specific folder?

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): 25.0.3
Operating system and version (eg, Ubuntu 20.04): Red Hat 4.8.5-44
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.48
PHP version (eg, 7.4): PHP 7.4.33

The issue you are facing:

some auto uploads files from nextcloud android are systematically blocked as locked files, so i cannot remove them, except by connecting in ssh to the server and deleting the locked database table (which is a massive move for just one or two files).

I don’t really understand why some files are put in locked state, and I undestand even less why those specific files are systematically locked (those are my signal app backups, the only characteristic i can think of is that they are big, more than 200Mo), but i suppose that when they have been successfully synchronized, I can safely suppress them if i want to, so i don’t need this lock operation.

So I wonder if there is a way to prevent them of being locked in the first place ? or to unlock them without connecting to the server ?

Is this the first time you’ve seen this error? (Y/N): N

Steps to replicate it:

  1. auto upload files of more than 200Mo from android nextcloud app
  2. wait untill upload and sync is complete
  3. try to delete them, impossible

The output of your Nextcloud log in Admin > Logging:

nothing recent

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

      1 <?php
      2 $CONFIG = array (
      3   'instanceid' => '************',
      4   'passwordsalt' => '******************************',
      5   'secret' => '************************************************',
      6   'trusted_domains' =>
      7   array (
      8     0 => 'nextcloud.hugulumu.fr',
      9   ),
     10   'datadirectory' => '/home/********/nextclouddata',
     11   'dbtype' => 'mysql',
     12   'version' => '25.0.3.2',
     13   'overwrite.cli.url' => 'https://nextcloud.hugulumu.fr/nextcloud',
     14   'dbname' => '****************',
     15   'dbhost' => 'localhost',
     16   'dbport' => '',
     17   'dbtableprefix' => 'oc_',
     18   'mysql.utf8mb4' => true,
     19   'dbuser' => '****************',
     20   'dbpassword' => '**********',
     21   'installed' => true,
     22   'maintenance' => false,
     23   'filelocking.enabled' => true,
     24   'theme' => '',
     25   'loglevel' => 1,
     26   'app_install_overwrite' =>
     27   array (
     28     0 => 'ownpad',
     29   ),
     30   'updater.secret' => '************************************************************',
     31   'trashbin_retention_obligation' => 'auto, 90',
     32 );

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

cannot find

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.

cannot find

You say it’s mainly the size. Except for the locking, are the files correctly uploaded? Question is a bit if the upload properly finishes, in case the system thinks the upload is still ungoing, that could explain this behavior.

Redis as file-locking cache helps a lot when you do many things on the server in parallel. Then the locking activities can lock up your database server. If you just upload this file from one client, it shouldn’t block though.

thank you for your answer ! i didn’t see it

I suppose indeed that it’s mainly the size, but i cannot be sure : i tried to reproduce the error with other file of similar size, and it worked, however i’m not sure if another problem is not interfering.

The files are correctly uploaded from my phone to my server, but then they cannot sync with my computer, they give an etag error. So maybe this problem of etag stop the sync between server and computer, and it keeps the fils in locking state so i cannot delete them ?

As for redis, I will use it on my new server in few weeks, but i think a should not have a probleme with those files, even without using redis, since I’m the only one to use them ?