Memcache \\OC\\Memcache\\Redis not available for local cache

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, 12.0.2): 16.0.0.9
Operating system and version (eg, Ubuntu 17.04): Debian GNU/Linux 9
Apache or nginx version (eg, Apache 2.4.25):
PHP version (eg, 7.1): 7.2.18

The issue you are facing:

Getting error

Internal Server Error

The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log.

When I checked logs I see below message in log.

message":{“Exception”:“OC\HintException”,“Message”:“Memcache \OC\Memcache\Redis not available for local cache”,“Code”:0,“Trace”:[{“file”:"/var/www/nextcloud/lib/private/Server.php",“line”:510,“function”:"__construct",“class”:"OC\Memcache\Factory

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

Config file:

<?php
$CONFIG = array (
  ....some lines missin....
  'dbtype' => 'mysql',
  'version' => '16.0.0.9',
  'overwrite.cli.url' => 'https://myprivatecloud.ddns.net/',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'user',
  'dbpassword' => '******',
  'installed' => true,
  'instanceid' => 'ocjpzbw8dip4',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => '/var/run/redis/redis.sock',
    'port' => 0,
    'timeout' => 0.0,
    'password' => '*****',
  ),
  'tempdirectory' => '/media/myCloudDrive/nc-data/tmp',
  'mail_smtpmode' => 'smtp',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_from_address' => 'admin',
  'mail_domain' => 'ownyourbits.com',
  'jpeg_quality' => '60',
  'overwriteprotocol' => 'https',
  'maintenance' => false,
  'logfile' => '/media/myCloudDrive/nc-data/nextcloud.log',
  'loglevel' => 2,
  'app_install_overwrite' => 
  array (
    0 => 'admin_notifications',
  ),
  'mail_sendmailmode' => 'smtp',
  'mail_smtpsecure' => 'ssl',
);

Have you changed anything? Was this working before?

No did not changed anything and yes it was working before.

Found this ownCloud post. I installed memcached package and restarted the server, now everything back to normal. Looks like it was package issue.

1 Like

I had same problem, could not solve it until I install redis php package:

apt install php-redis
/etc/init.d/apache2 restart

Now everything goes fine, cache is enabled in nextcloud.

PS: had a clue from the log file : «“File”:"/var/www/owncloud/lib/private/Memcache/Factory.php",“Line”:98,“Hint”:“Is the matching PHP module installed and enabled?”»

1 Like

Now I have the same Problem. Before it works.

apt-cache policy php-redis php-redis: Installed: 5.3.4+4.3.0-1+0~20210329.35+debian10~1.gbpdc7ead Candidate: 5.3.4+4.3.0-1+0~20210329.35+debian10~1.gbpdc7ead Version table: *** 5.3.4+4.3.0-1+0~20210329.35+debian10~1.gbpdc7ead 550 10 https://packages.sury.org/php buster/main amd64 Packages 100 /var/lib/dpkg/status 4.2.0-1 500 500 http://deb.debian.org/debian buster/main amd64 Packages

PHP 7.3.27-1~deb10u1