Warning: The database is used for transactional file locking

@Cphusion was spot on. I also had this same issue since updating from 26 to 27. My instance is on a Ubuntu Server and all of the steps provided has resolve that issue for me. I now have a green check :). Thanks again!.

Update: Since the change, now I can’t view any video files, such as .mp4, .mov and etc. I can only view jpeg and other picture files. I noticed when I remove those lines, videos are playing again. Please advise how can I resolve this.

I can still view both picture and video files, I don’t have anything special about my setup just a standard setup with redis enabled.

A reboot wasn’t necessary. The only thing that you needed to do was to either restart apache or php-fpm. Glad you got it working though!

First place I would check is your redis log file.

Thanks, I was able to resolve it. I only added the first three lines shown below and not the rest, and it worked. Green check and able to view all content. Thanks for your help

Only Added
‘memcache.local’ => ‘\OC\Memcache\APCu’,
‘filelocking.enabled’ => true,
‘memcache.locking’ => ‘\OC\Memcache\Redis’,

Did not include
‘redis’ => array(
‘host’ => ‘/var/run/redis/redis-server.sock’,
‘port’ => 0,
‘timeout’ => 0.0,
),

I use both.

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

  1. Memory caching — Nextcloud latest Administration Manual latest documentation
  2. https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/caching_configuration.html#connecting-to-single-redis-server-over-unix-socket
    From my understanding of the Nextcloud documentation 1 is just configuring your Nexctcloud instance to use Redis and 2 is configuring Redis.

I did remove APCu at one point and then I got some error about it, so I added it back.

Thanks for the info. At the moment, it’s working for me without it. Let’s see what happens with future updates.

No need for redis. Only APCu is working as well.

'memcache.local' => '\OC\Memcache\APCu',
'filelocking.enabled' => true,
'memcache.locking' => '\OC\Memcache\APCu',
5 Likes

Hi, can you update your description with a restart of apache2 after the usermod. It was necessary to take the modification into account

This one worked for me just fine, as mentioned, no need for redis. Greatly appreciated!

1 Like

Perfect here also! Many thanks! (27.1.15)

Just for the record.
Using APCu for Transactional file locking may have unwanted side effects.
See comment to issue #38796

Keep in mind that APCu only works for web request.
That means occ or cron.php (if called from system cron) cannot access the locks.

1 Like

@Snufkin, thanks to your comment I could solve the warning. Could you please explain why using APCu for Transactional file locking may have unwanted side effects?

Thanks in advance!

I used Cphusion’s instructions and got redis working (and the warning gone) on a Debian (raspberry pi) server. Here’s his post:

Only 2 small differences were needed for me:

  1. the /var/run in his instructions are /run for mine. The run dir is in the root directory.
  2. after the steps are done, reload apache2: sudo service apache2 reload

Oh, and when I went into the redis.conf file I found the 2 lines that were to be added, commented out, and just uncommented them. They used port 700 which I went with, instead of port 660. I think both ports are not commonly used by other services and either one will work.

Very good instructions. Thanks Cphusion!

Worked like a charm. Thanks!

Edit:

Actually I had to use this instead (from the documentation):

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

Edit 2:

I was getting some errors and cron stopped working.

I did a fresh install again.

This time I didn’t configure redis unixsocket/unixsocketperm. Only installed redis.

Thank you all.