Transactional file locking should be configured to use memory-based locking unsolved

After I updated #41165 to recent 10.13.4.1 I see in Admin page
image

Ok, after reading the easiest way to enable it

sudo apt install php7.4-apcu
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
php7.4-apcu is already the newest version (5.1.23-1+ubuntu22.04.1+deb.sury.org+1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

and change config.php

The message is still there. Does someone understand, what wrong here ?

This is my config report

{
    "basic": {
        "license key": "***REMOVED SENSITIVE VALUE***",
        "date": "Wed, 31 Jan 2024 11:33:36 +0000",
        "ownCloud version": "10.13.4.1",
        "ownCloud version string": "10.13.4",
        "ownCloud edition": "Community",
        "server OS": "Linux",
        "server OS version": "Linux Latitude 5.15.0-92-generic #102-Ubuntu SMP Wed Jan 10 09:33:48 UTC 2024 x86_64",
        "server SAPI": "apache2handler",
        "webserver version": "Apache\/2.4.52 (Ubuntu) Phusion_Passenger\/6.0.10 OpenSSL\/3.0.2",
        "hostname": "www.server.info",
        "logged-in user": "hannes"
    },
    "stats": {
        "users": {
            "Database": {
                "total_count": 5,
                "guest_count": 0,
                "seen": 5,
                "logged in (30 days)": 3
            }
        },
        "groups": {
            "OC\\Group\\Database": 2,
            "OCA\\Guests\\GroupBackend": 1
        }
    },
    "config": {
        "filelocking.enabled": true,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "updatechecker": false,
        "instanceid": "ocr8mbf8x3zx",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "www.server.info"
        ],
        "datadirectory": "\/daten\/owncloud\/data",
        "overwrite.cli.url": "https:\/\/www.server.info\/owncloud",
        "dbtype": "pgsql",
        "version": "10.13.4.1",
        "dbname": "owncloud",
        "dbhost": "localhost",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "logtimezone": "UTC",
        "installed": true,
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "loglevel": 2,
        "maintenance": false,
        "theme": "",
        "updater.secret": "***REMOVED SENSITIVE VALUE***",
        "allow_user_to_change_mail_address": "",
        "files_antivirus.av_path": "\/usr\/bin\/clamscan",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465"
    },
    "integritychecker": {
        "passing": true,
        "enabled": true,
        "result": []
    },

It’s a follow up of Transactional file locking should be configured to use memory-based locking · Issue #41169 · owncloud/core · GitHub

I added in /etc/php/7.4/apache2/php.ini

apc.enabled=1
apc.file_update_protection=2
apc.optimization=0
apc.shm_size=256M
apc.include_once_override=0
apc.shm_segments=1

apc.ttl=7200
apc.user_ttl=7200
apc.gc_ttl=3600
apc.num_files_hint=1024
apc.enable_cli=0
apc.max_file_size=5M
apc.cache_by_default=1
apc.use_request_time=1
apc.slam_defense=0
#apc.mmap_file_mask=/tmp/apc/apc.XXXXXX
apc.stat_ctime=0
apc.canonicalize=1
apc.write_lock=1
apc.report_autofilter=0
apc.rfc1867=0
apc.rfc1867_prefix =upload_
apc.rfc1867_name=APC_UPLOAD_PROGRESS
apc.rfc1867_freq=0
apc.rfc1867_ttl=3600
apc.lazy_classes=0
apc.lazy_functions=0
sudo systemctl restart apache2

cd <your ownloud directory>
sudo wget https://raw.githubusercontent.com/krakjoe/apcu/master/apc.php

Then call the script in your domain via your browser, call https://<your-domain>/apc.php

image

but message is still there
image

I’m not a Redis expert, but to me, it appears that you missed something in your config.php.

Configure Caching and File Locking

occ config:system:set \
   memcache.local \
   --value '\OC\Memcache\APCu'
occ config:system:set \
   memcache.locking \
   --value '\OC\Memcache\Redis'
occ config:system:set \
   redis \
   --value '{"host": "127.0.0.1", "port": "6379"}' \
   --type json
2 Likes

When I read about cache types, Memory Caching I understand this either …or, and not “I need all of them”

The easiest cache to use is APCu,

So my idea was, lets go with APCu only …
There was no word about redis

When I understand you right, I need now APCu and Redis, am I right ?

As I said, I’m not an expert.

EDIT:

As cache, yes. But you’re talking about file locking …

2 Likes

To be honest, I even don’t see a reason why I need this all complicated stuff, but the message annoys me.
Would it be better to have a switch where I can hide this warning and accept the slow database locking ? Keep it simple. I’ve only 4 users

Hey,

maybe the headline of Memory Caching is a little bit misleading but i think the content of the page makes it somehow clear that there seems to be two things which needs to be configured and enabled:

Memory Caching

This could be either:

  1. APCu
  2. Redis
  3. Memcached

and seems to have been already done and is working.

Transactional File Locking

This can be only Redis

As the message is only about Transactional File Locking it seems this configuration / setup is currently missing (as also already determined by Alfred).

To me the setup looks like simple for this:

  1. Install Redis like described in the documentation via sudo apt install redis-server php-redis
  2. Configure Redis to use Unix sockets like described in the documentation as well

As an alternative i think you could also ignore the message.

1 Like

Hey,

and i think if the documentation is still not clear then i think the ownCloud people would be happy about receiving concrete improvement suggestions like described here:

1 Like