Redis Cache By Xon

Redis Cache By Xon 2.18.1

No permission to download
While trying to install, the screen (in ACP) goes white. Usually after it shows "Importing add-on data (templates)." The forum itself then fails to load for a few seconds. Then everything is fine and the add-on remains not installed. Any ideas?
 
You likely have a syntax error in your config.php file and have php error reporting disabled
 
i am getting below error


  • CredisException: Template public:PAGE_CONTAINER error: Connection to Redis 127.0.0.1:6380 failed after 2 failures.Last Error : (1) Connection refused
  • src/addons/SV/RedisCache/Credis/Client.php:493

  • Generated by: Unknown account
  • Apr 12, 2020 at 10:34 AM

Stack trace

#0 src/addons/SV/RedisCache/Credis/Client.php(489): Credis_Client->connect()
#1 src/addons/SV/RedisCache/Credis/Client.php(811): Credis_Client->connect()
#2 src/addons/SV/RedisCache/Redis.php(236): Credis_Client->__call('get', Array)
#3 src/addons/SV/RedisCache/CacheProvider.php(46): SV\RedisCache\Redis->doFetch('sv_xfLessValueC...')
#4 src/addons/SV/RedisCache/XF/CssRenderer.php(179): SV\RedisCache\CacheProvider->fetch('xfLessValueCach...')
#5 src/XF/Template/Templater.php(2981): SV\RedisCache\XF\CssRenderer->parseLessColorValue('rgb(63, 66, 87)')
#6 [internal function]: XF\Template\Templater->fnParseLessColor(Object(Iconify\Iconify\Template\Templater), true, 'rgb(63, 66, 87)')
#7 src/XF/Template/Templater.php(936): call_user_func_array(Array, Array)
#8 internal_data/code_cache/templates/l1/s25/public/PAGE_CONTAINER.php(388): XF\Template\Templater->func('parse_less_colo...', Array, true)
#9 src/XF/Template/Templater.php(1315): XF\Template\Templater->{closure}(Object(Iconify\Iconify\Template\Templater), Array)
#10 src/XF/Pub/App.php(547): XF\Template\Templater->renderTemplate('PAGE_CONTAINER', Array)
#11 src/XF/App.php(1995): XF\Pub\App->renderPageHtml('


...', Array, Object(XF\Mvc\Reply\View), Object(XF\Mvc\Renderer\Html))
#12 src/XF/Mvc/Dispatcher.php(402): XF\App->renderPage('

how can i fix it ?
 
CredisException: Template public:pAGE_CONTAINER error: Connection to Redis 127.0.0.1:6380 failed after 2 failures.Last Error : (1) Connection refused

Is your redis installation really installed on port 6380?

config.php by default:
Code:
$config ['cache'] ['provider'] = 'SV\RedisCache\Redis';
$config ['cache'] ['config'] = array (
'server' => '127.0.0.1',
'port' => 6379,
'connect_retries' => 2,
'use_lua' => true,
'compress_data' => 6,
'read_timeout' => 1,
'timeout' => 1,
'serializer' => 'igbinary',
// 'serializer' => 'php',
);
 
this is my config.php file details

// START Redis configuration //
$config['cache']['enabled'] = true;
$config['cache']['sessions'] = true;
$config['cache']['provider'] = 'SV\RedisCache\Redis';
$config['cache']['config'] = array(
'server' => '127.0.0.1',
'port' => 6379,
'connect_retries' => 2,
'use_lua' => true,
'compress_data' => 6,
'read_timeout' => 1,
'timeout' => 1,
'serializer' => 'igbinary',
// 'serializer' => 'php',
'persistent' => true,
);
// END Redis configuration //

// START Guest page caching //
$config['pageCache']['enabled'] = true;
$config['cache']['context']['page']['provider'] = 'SV\RedisCache\Redis';
$config['cache']['context']['page']['config'] = ['127.0.0.1'];
// END Guest page caching //

// START CSS caching //
$config['cache']['context']['css'] = [
'namespace' => 'sv',
'provider' => 'SV\RedisCache\Redis',
'config' => [
'server' => '127.0.0.1',
'port' => 6380,
],
];
// END CSS caching //
 
If you wish to use redis on different ports you also have multiple redis install on different ports.
Here is an example if Redis is only installed on one port. Then you use different databases ...
Code:
$config['pageCache']['enabled'] = false;
$config['cache']['enabled'] = true;
$config['cache']['provider'] = 'SV\RedisCache\Redis';
$config['cache']['config']  = array(
'server' => '127.0.0.1',
'port' => 6379,
'database' => 0,
'connect_retries' => 1,
'use_lua' => true,
'compress_data' => 0,
'read_timeout' => 1,
'timeout' => 1,
'serializer' => 'igbinary',
'persistent' => true);
// START CSS caching //
$config['cache']['css'] = true;
$config['cache']['context']['css'] = [       
    'namespace' => 'sv',
            'provider' => 'SV\RedisCache\Redis',
            'config' => [
            'server' => '127.0.0.1',
            'port' => 6379,
            'database' => 1,
            'connect_retries' => 1,
            'use_lua' => true,
            'compress_data' => 0,
            'read_timeout' => 1,
            'timeout' => 1,
            'serializer' => 'igbinary',
            'persistent' => true,
            ],
        ];
// END CSS caching //
// START session caching //
$config['cache']['sessions'] = true;
$config['cache']['context']['sessions'] = [       
    'namespace' => 'svsess',
            'provider' => 'SV\RedisCache\Redis',
            'config' => [
            'server' => '127.0.0.1',
            'port' => 6379,
            'database' => 2,
            'connect_retries' => 1,
            'use_lua' => true,
            'compress_data' => 0,
            'read_timeout' => 1,
            'timeout' => 1,
            'serializer' => 'igbinary',
            'persistent' => true,
            ],
        ];
// END session caching //
// START registry caching //
$config['cache']['registry'] = true;
$config['cache']['context']['registry'] = [       
    'namespace' => 'svregistry',
            'provider' => 'SV\RedisCache\Redis',
            'config' => [
            'server' => '127.0.0.1',
            'port' => 6379,
            'database' => 3,
            'connect_retries' => 1,
            'use_lua' => true,
            'compress_data' => 0,
            'read_timeout' => 1,
            'timeout' => 1,
            'serializer' => 'igbinary',
            'persistent' => true,
            ],
        ];
// END registry caching //
 
Hello,

I see that both ports are working on my server (6379 and 6380)

tcp 0 0 127.0.0.1:6379 0.0.0.0:* LISTEN 2449/redis-server 1
tcp 0 0 127.0.0.1:6380 0.0.0.0:* LISTEN 33756/redis-server

but still i am getting the error . do u recommend me to use different databases on same port or different ports ?
 
Unless you have a large forum, using XenForo's "cache context" system with separate cache instances isn't worth it.
 
I have pretty solid server ( 32gb memory). this is why i wanted to use the cache system. can u help me in fixing the error which i have pasted in my earlier message.
 
I have pretty solid server ( 32gb memory). this is why i wanted to use the cache system. can u help me in fixing the error which i have pasted in my earlier message.

With 32 GB Ram you should optimize your SQL server ...
Anyway. Your Redis addon configuration is incorrect / incomplete. The mistake could therefore come from

Use the configuration I posted and just replace the port (6379 -> 6380) where desired. This should work if Redis is correctly installed on port 6380.

I omitted the pageCache because it can cause problems for the user when logging out.
 
Setting up redis (or any cache server) and the basics of connecting to it isn't something I can support with this add-on. There are plenty on-line tutorials for that, and you can just use the suggested defaults for this add-onfor the initial setup.

Please refer to the Server configuration and hosting sub-forum for questions on server optimization.
 
Hello Ron,

i am asking help only for the error i am getting with Redis configuration. both 6379 and 6380 ports are installed on my server. i am getting template error on port 6380.
can you help me in fixing the error ?
do u recomend me using 1 single port and use 2 databases ?
 
I'm sure Xon will update the plugin but I just wanted to remind that Redis 6 is due by the end of the month.

Hi Redis users, Redis 6 is approaching and will be released 30th of April. New release candidates will be released at the end of March, then another one mid April, to finally reach the GA at the end of April.
 
how do i know if it's working? nothing is broken, i've installed all the parts, but i can't tell if it's doing anything....q
 
how do i know if it's working? nothing is broken, i've installed all the parts, but i can't tell if it's doing anything....q
In the admincp home page ,you'll have a "redis information" chunk;

1587720430098.webp

The to/from is only the instance and doesn't include the slaves which I should fix.
 
Back
Top Bottom