Cache for Images

Hi to everybody,
my cloud has tens of thousand of pictures, when i try to see them the cloud needs lot of time to load the previews. I read on this forum that i should install previewgenerators app in order to create the previews. I have installed it and enalbed with
occ app:enable previewgenerator
When i run the command
occ preview:generate-all
it takes a lot of time (like 6/7 hours) until it block itself (without finish all paths).
I also read that i can achive the same aim installing redis. I installed it (following this guide https://computingforgeeks.com/install-and-configure-redis-server-on-rhel-8-centos-8/), but now if i try to connect to my cloud i recevie this message from nextcloud.log.

{“reqId”:“Xo9QL@@hoJsuHVUWGzOQVwAAABg”,“level”:3,“time”:“2020-04-09T16:41:21+00:00”,“remoteAddr”:“192.168.1.52”,“user”:“–”,“app”:“core”,“method”:“GET”,“url”:“/”,“message”:{“Exception”:“OC\HintException”,“Message”:“Memcache \OC\Memcache\Redis not available for distributed cache”,“Code”:0,“Trace”:[{“file”:“/var/www/html/nextcloud/lib/private/Server.php”,“line”:625,“function”:“__construct”,“class”:“OC\Memcache\Factory”,“type”:“->”,“args”:[“0171b9e708baeb267823dffec411a8a1”,{“class”:“OC\Log”},“\OC\Memcache\APCu”,“\OC\Memcache\Redis”,null]},{“file”:“/var/www/html/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php”,“line”:118,“function”:“OC\{closure}”,“class”:“OC\Server”,“type”:“->”,“args”:[“*** sensitive parameters replaced “]},{“file”:”/var/www/html/nextcloud/lib/private/ServerContainer.php",“line”:125,“function”:“offsetGet”,“class”:“Pimple\Container”,“type”:“->”,“args”:[“OC\Memcache\Factory”]},{“file”:“/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php”,“line”:162,“function”:“query”,“class”:“OC\ServerContainer”,“type”:“->”,“args”:[“OC\Memcache\Factory”]},{“file”:“/var/www/html/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php”,“line”:114,“function”:“OC\AppFramework\Utility\{closure}”,“class”:“OC\AppFramework\Utility\SimpleContainer”,“type”:“->”,“args”:[" sensitive parameters replaced “]},{“file”:”/var/www/html/nextcloud/lib/private/ServerContainer.php",“line”:125,“function”:“offsetGet”,“class”:“Pimple\Container”,“type”:“->”,“args”:[“MemCacheFactory”]},{“file”:“/var/www/html/nextcloud/lib/private/Server.php”,“line”:1645,“function”:“query”,“class”:“OC\ServerContainer”,“type”:“->”,“args”:[“MemCacheFactory”]},{“file”:“/var/www/html/nextcloud/lib/private/Server.php”,“line”:588,“function”:“getMemCacheFactory”,“class”:“OC\Server”,“type”:“->”,“args”:[]},{“file”:“/var/www/html/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php”,“line”:118,“function”:“OC\{closure}”,“class”:“OC\Server”,“type”:“->”,“args”:[" sensitive parameters replaced “]},{“file”:”/var/www/html/nextcloud/lib/private/ServerContainer.php",“line”:125,“function”:“offsetGet”,“class”:“Pimple\Container”,“type”:“->”,“args”:[“OCP\IURLGenerator”]},{“file”:“/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php”,“line”:162,“function”:“query”,“class”:“OC\ServerContainer”,“type”:“->”,“args”:[“OCP\IURLGenerator”]},{“file”:“/var/www/html/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php”,“line”:114,“function”:“OC\AppFramework\Utility\{closure}”,“class”:“OC\AppFramework\Utility\SimpleContainer”,“type”:“->”,“args”:[" sensitive parameters replaced “]},{“file”:”/var/www/html/nextcloud/lib/private/ServerContainer.php",“line”:125,“function”:“offsetGet”,“class”:“Pimple\Container”,“type”:“->”,“args”:[“URLGenerator”]},{“file”:“/var/www/html/nextcloud/lib/private/Server.php”,“line”:1618,“function”:“query”,“class”:“OC\ServerContainer”,“type”:“->”,“args”:[“URLGenerator”]},{“file”:“/var/www/html/nextcloud/lib/private/Server.php”,“line”:1098,“function”:“getURLGenerator”,“class”:“OC\Server”,“type”:“->”,“args”:[]},{“file”:“/var/www/html/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php”,“line”:118,“function”:“OC\{closure}”,“class”:“OC\Server”,“type”:“->”,“args”:[" sensitive parameters replaced ***”]},{“file”:“/var/www/html/nextcloud/lib/private/ServerContainer.php”,“line”:125,“function”:“offsetGet”,“class”:“Pimple\Container”,“type”:“->”,“args”:[“OC\Template\JSCombiner”]},{“file”:“/var/www/html/nextcloud/lib/private/TemplateLayout.php”,“line”:344,“function”:“query”,“class”:“OC\ServerContainer”,“type”:“->”,“args”:[“OC\Template\JSCombiner”]},{“file”:“/var/www/html/nextcloud/lib/private/TemplateLayout.php”,“line”:174,“function”:“findJavascriptFiles”,“class”:“OC\TemplateLayout”,“type”:“::”,“args”:[[“core/js/dist/main”,“js/merged-template-prepend”,“search/js/search”,“core/l10n/it”,“search/l10n/it”,“search/js/searchprovider”,“js/files/fileinfo”,“js/files/client”]]},{“file”:“/var/www/html/nextcloud/lib/private/legacy/template.php”,“line”:184,“function”:“__construct”,“class”:“OC\TemplateLayout”,“type”:“->”,“args”:[“error”,“”]},{“file”:“/var/www/html/nextcloud/lib/private/Template/Base.php”,“line”:132,“function”:“fetchPage”,“class”:“OC_Template”,“type”:“->”,“args”:},{“file”:“/var/www/html/nextcloud/lib/private/legacy/template.php”,“line”:333,“function”:“printPage”,“class”:“OC\Template\Base”,“type”:“->”,“args”:},{“file”:“/var/www/html/nextcloud/index.php”,“line”:57,“function”:“printExceptionErrorPage”,“class”:“OC_Template”,“type”:“::”,“args”:[{“class”:“OC\HintException”},500]}],“File”:“/var/www/html/nextcloud/lib/private/Memcache/Factory.php”,“Line”:113,“Hint”:“Is the matching PHP module installed and enabled?”,“CustomMessage”:“–”},“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36”,“version”:“18.0.2.2”}

I tried to solve this problem but all methods that i read fails.

What is the best solution to make faster the cloud when i want to see photos? How i can achive it?

If the best solution is still the previewgenerator app how i can come back to my “classic” cache and solve log problem ?

config.php

<?php
$CONFIG = array (
  'instanceid' => '**********',
  'passwordsalt' => '**********',
  'secret' => '******',
  'trusted_domains' => 
  array (
    0 => '192.168.1.226',
      ),
  'datadirectory' => '/var/www/html/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '18.0.2.2',
  'overwrite.cli.url' => 'http://192.168.1.226',
  'dbname' => '******',
  'dbhost' => 'localhost:80',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => '******',
  'dbpassword' => '*******',
  'installed' => true,
  'maintenance' => false,




'memcache.local' => '\OC\Memcache\APCu',
'memcache.distributed' => '\OC\Memcache\Redis',
'redis' => [
     'host'     => '/var/run/redis/redis.sock',
     'port'     => 6379,
     'dbindex'  => 0,
     'password' => 'secret',
     'timeout'  => 1.5,
],
);

thanks in advance

If you want to use Redis, you have to make sure that the related php7.x-redis module is installed and configured for the php cli and web component. Due to the fact that related questions are asked on a regular base in this forum, I would recommend to use the search function (upper right corner) to find further information about how this need to be done :wink: