ResolveTransactional file locking message in admin page

Expected behaviour

I tried to solve the message that I get in admin page

Transactional file locking should be configured to use memory-based locking, not the default slow database-based locking. See the documentation :arrow_upper_right: for more information.

Following the guide, I installed the APCu and I added in the config file the "memcache.local": "\\OC\\Memcache\\APCu",

I restarted the Apache2, but the message is still there

Actual behaviour

the message is still there

Server configuration

Operating system: Ubuntu 16.04

Web server: Apache2

Database: MySQL

PHP version: PHP Version 7.0.22-0ubuntu0.16.04.1

ownCloud version: 10.0.3.3

Updated from an older ownCloud or fresh install: fresh

Where did you install ownCloud from: owncloud

Signing status (ownCloud 9.0 and above):

No errors have been found.

The content of config/config.php:

{
    "system": {
        "instanceid": "ocvgzukzb4qp",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "my.domain.com"
        ],
        "datadirectory": "\/var\/www\/html\/my.domain.com\/owncloud\/data",
        "overwrite.cli.url": "http:\/\/myfolder\/owncloud",
        "dbtype": "mysql",
        "version": "10.0.3.3",
        "dbname": "myownclouddb",
        "dbhost": "localhost",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "logtimezone": "UTC",
        "installed": true,
        "mail_from_address": "mycloud",
        "mail_smtpmode": "php",
        "mail_domain": "mydomain.com",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "loglevel": 2
    }
}

Client configuration

Browser: Chrome

Operating system: Windows 10

You have configured the memory cache.

This is how you enable file locking:

https://doc.owncloud.com/server/10.0/admin_manual/configuration/server/caching_configuration.html#configuring-transactional-file-locking

Thanks for your help! From the link you posted:

'filelocking.enabled' => true,
'memcache.locking' => '\OC\Memcache\Redis',
'redis' => [
     'host' => 'localhost',
     'port' => 6379,
     'timeout' => 0.0,
     'password' => '', // Optional, if not defined no password will be used.
 ],

From this line 'memcache.locking' => '\OC\Memcache\Redis', I understand that I have to installl Redis first?

You can try it with the memcache, but we recommend installing redis

Thanks!
You have done great work! :slight_smile:

If it works with your setup - I am glad that I could help you out :slight_smile:

I come back because the message is still there after I installed the Redis. I followed this guide to install Redis, I removed the line "memcache.local": "\\OC\\Memcache\\APCu", from the confing.php and I added the :

  'filelocking.enabled' => true,
  'memcache.locking' => '\OC\Memcache\Redis',
  'redis' => [
       'host' => '/var/run/redis.sock',
       'port' => 0,
       'timeout' => 0.0,
       'password' => '', // Optional, if not defined no password will be used.
  ],

But the message is still there...

The redis is running without any errors,

 sudo systemctl status redis
● redis.service - Redis In-Memory Data Store
   Loaded: loaded (/etc/systemd/system/redis.service; enabled; vendor preset: enabled)
   Active: active (running) since Thu 2017-10-19 08:01:15 UTC; 14min ago
 Main PID: 1055 (redis-server)
    Tasks: 4
   Memory: 4.4M
      CPU: 1.359s
   CGroup: /system.slice/redis.service
           └─1055 /usr/local/bin/redis-server 127.0.0.1:0

Oct 19 08:01:16 myserver redis-server[1055]:   `-._    `-._`-.__.-'_.-'    _.-'
Oct 19 08:01:16 myserver redis-server[1055]:  |`-._`-._    `-.__.-'    _.-'_.-'|
Oct 19 08:01:16 myserver redis-server[1055]:  |    `-._`-._        _.-'_.-'    |
Oct 19 08:01:16 myserver redis-server[1055]:   `-._    `-._`-.__.-'_.-'    _.-'
Oct 19 08:01:16 myserver redis-server[1055]:       `-._    `-.__.-'    _.-'
Oct 19 08:01:16 myserver redis-server[1055]:           `-._        _.-'
Oct 19 08:01:16 myserver redis-server[1055]:               `-.__.-'
Oct 19 08:01:16 myserver redis-server[1055]: 1055:M 19 Oct 08:01:16.010 # Server initialized
Oct 19 08:01:16 myserver redis-server[1055]: 1055:M 19 Oct 08:01:16.013 * DB loaded from disk: 0.003 seconds
Oct 19 08:01:16 myserver redis-server[1055]: 1055:M 19 Oct 08:01:16.013 * The server is now ready to accept connections at /tmp/redis.sock

When I tried to add the 'memcache.local' => '\OC\Memcache\Redis', in the browser I get a message:

Memcache \OC\Memcache\Redis not available for local cache Is the matching PHP module installed and enabled?

I tried to install php5-redis but the package can't not be located (my server OS is Ubuntu 16.04)..
The message I got is caused because of the missing module?

Thanks a lot!

Would you consider switching to php7?
I think it will be easier to find the correct modules.

Yes! However, could you guide me how to switch to php7?
I thought that Ubuntu 16.04 uses php7 You mean that I installed Redis on php 5?
Forgive me for all these questions but i am newbie in system administrator..

I think you can just remove pjp5 and install php7

Well I installed the php module by

sudo apt install php-redis

and then in my config.php I added:

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

and the message resolved.

what would be the instructions for Centos 7? Haven’t been able to find one tutorial on how to enable Redis on Centos. Already installed redis and its running but I can’t add the php extension for it.

Finding the right php packages for owncloud can be a right royal pain in the bum.

I have the following loaded. I’m not sure if they are all needed, but you may be looking for php-pecl-redis5.
php.x86_64 7.4.23-1.el7.remi @remi-php74
php-cli.x86_64 7.4.23-1.el7.remi @remi-php74
php-common.x86_64 7.4.23-1.el7.remi @remi-php74
php-devel.x86_64 7.4.23-1.el7.remi @remi-php74
php-gd.x86_64 7.4.23-1.el7.remi @remi-php74
php-intl.x86_64 7.4.23-1.el7.remi @remi-php74
php-json.x86_64 7.4.23-1.el7.remi @remi-php74
php-ldap.x86_64 7.4.23-1.el7.remi @remi-php74
php-mbstring.x86_64 7.4.23-1.el7.remi @remi-php74
php-mysqlnd.x86_64 7.4.23-1.el7.remi @remi-php74
php-opcache.x86_64 7.4.23-1.el7.remi @remi-php74
php-pdo.x86_64 7.4.23-1.el7.remi @remi-php74
php-pear.noarch 1:1.10.13-1.el7.remi @remi-php74
php-pecl-apcu.x86_64 5.1.20-1.el7.remi.7.4 @remi-php74
php-pecl-igbinary.x86_64 3.2.6-1.el7.remi.7.4 @remi-php74
php-pecl-memcache.x86_64 4.0.5.2-1.el7.remi.7.4 @remi-php74
php-pecl-msgpack.x86_64 2.1.2-1.el7.remi.7.4 @remi-php74
php-pecl-redis5.x86_64 5.3.4-1.el7.remi.7.4 @remi-php74
php-pecl-zip.x86_64 1.19.4-1.el7.remi.7.4 @remi-php74
php-process.x86_64 7.4.23-1.el7.remi @remi-php74
php-sodium.x86_64 7.4.23-1.el7.remi @remi-php74
php-xml.x86_64 7.4.23-1.el7.remi @remi-php74
php-xmlrpc.x86_64 7.4.23-1.el7.remi @remi-php74