Resource icon

Zend Redis Cache 1.6.0

No permission to download
This are commonly caused by latency issues caused by fork() speed(can be slow for some VMs) for when redis creates a save.

For some reason this causes phpredis to be confused with the connection's state. Reducing how often you save to disk helps a lot. Also try updating phpredis too.
 
Last edited:
Confused...:confused:
@Xon I think I need a hint. :D ;)


Xenforo 1.5.11, php 5.6.27

PHP Info says:
upload_2016-11-9_20-48-35.webp
Redis Server is runing, and I can ping / pong him (redis-cli).
(installed on Ubuntu 14.04.5 LTS after apt-get update and apt-get upgrade then with apt-get install redis-server)

Your addon is the latest version (1.1.14) and no error logs in xenforo to see.


Now Redis ON in config.php with:

PHP:
// Cache Start

// setup redis caching
$config['cache']['enabled'] = true;
$config['cache']['cacheSessions'] = true;
$config['cache']['frontend'] = 'Core';
$config['cache']['frontendOptions'] = array(
'caching' => true,
'cache_id_prefix' => 'xfzf1_',
'lifetime' => 0
);

$config['cache']['backendOptions'] = array(
        'server' => 'zetor-forum.de',
        'port' => 6379,
        );
// install Redis-aware XF Caching replacement. Will break in XF 2.0
require(XenForo_Application::getInstance()->getConfigDir().'/SV/RedisCache/Installer.php');      
       
// $redis = XenForo_Application::getCache()->getBackend()->getCredis();      
// Cache Ende

In ACP it tells me:
upload_2016-11-9_20-43-42.webp

But in frontend I have now interesting errors:

1.
upload_2016-11-9_20-45-0.webp

instead bevore with Redis Cache OFF:
upload_2016-11-9_20-45-27.webp

or 2.
upload_2016-11-9_20-45-49.webp

instead bevore with Redis cache OFF:
upload_2016-11-9_20-46-6.webp
:eek:

A redis-cli FLUSHALL changes nothing...

Any Idea whats going wrong when I activate Redis Cache? What will I have forget? hmm... :unsure:
 
Where is:
Code:
$config['cache']['backend'] = 'Redis';

This is mine configuration and working OK.
Try it:
Code:
$config['cache']['enabled'] = true;
$config['cache']['cacheSessions'] = true;
$config['cache']['frontend'] = 'Core';
$config['cache']['frontendOptions'] = array(
'caching' => true,
'cache_id_prefix' => 'YOURPREFIX_',
'automatic_serialization' => false,
'lifetime' => 0
);

$config['cache']['backend'] = 'Redis';
$config['cache']['backendOptions'] = array(
'server' => '127.0.0.1',
'port' => 6379,
'connect_retries' => 2,
'use_lua' => true,
);
require(XenForo_Application::getInstance()->getConfigDir().'/SV/RedisCache/Installer.php');


00-12-28.webp
 
Last edited:
I am using this last version, but it is no update for months (10.06.2016.)
https://github.com/phpredis/phpredis 's php7 branch is being actively updated, but I have no idea how stable it is.

I am saving via cron once at hour.
it has been for months, but this error show up for first time yesterday
Is it still happening? This is often difficult to troubleshoot.

Confused...:confused:
@Xon I think I need a hint. :D ;)


Xenforo 1.5.11, php 5.6.27

PHP Info says:
View attachment 143393
Redis Server is runing, and I can ping / pong him (redis-cli).
(installed on Ubuntu 14.04.5 LTS after apt-get update and apt-get upgrade then with apt-get install redis-server)

Your addon is the latest version (1.1.14) and no error logs in xenforo to see.


Now Redis ON in config.php with:

PHP:
// Cache Start

// setup redis caching
$config['cache']['enabled'] = true;
$config['cache']['cacheSessions'] = true;
$config['cache']['frontend'] = 'Core';
$config['cache']['frontendOptions'] = array(
'caching' => true,
'cache_id_prefix' => 'xfzf1_',
'lifetime' => 0
);

$config['cache']['backendOptions'] = array(
        'server' => 'zetor-forum.de',
        'port' => 6379,
        );
// install Redis-aware XF Caching replacement. Will break in XF 2.0
require(XenForo_Application::getInstance()->getConfigDir().'/SV/RedisCache/Installer.php');    
     
// $redis = XenForo_Application::getCache()->getBackend()->getCredis();    
// Cache Ende

In ACP it tells me:
View attachment 143386

But in frontend I have now interesting errors:

1.
View attachment 143387

instead bevore with Redis Cache OFF:
View attachment 143388

or 2.
View attachment 143389

instead bevore with Redis cache OFF:
View attachment 143390
:eek:

A redis-cli FLUSHALL changes nothing...

Any Idea whats going wrong when I activate Redis Cache? What will I have forget? hmm... :unsure:

I'm fairly sure it is that you are missing the line:
Code:
$config['cache']['backend'] = 'Redis';

There is likely an error in the outputed css files which gives some hint to this.
 
Oh damn... Ok, added and cache prefix changed - but the same as bevore.

PHP:
// setup redis caching
$config['cache']['enabled'] = true;
$config['cache']['cacheSessions'] = true;
$config['cache']['frontend'] = 'Core';
$config['cache']['frontendOptions'] = array(
'caching' => true,
'cache_id_prefix' => 'xfzfde_',
'automatic_serialization' => false,
'lifetime' => 0
);
$config['cache']['backend'] = 'Redis';
$config['cache']['backendOptions'] = array(
        'server' => '127.0.0.1',
        'port' => 6379,
        );
// install Redis-aware XF Caching replacement. Will break in XF 2.0
require(XenForo_Application::getInstance()->getConfigDir().'/SV/RedisCache/Installer.php');

It looks like its a CSS problem when Redis caching is on.

There is likely an error in the outputed css files which gives some hint to this.
I take a look at this xenforo with the errors above and my test installation on same server, same php version, same redis (other prefix), same browser and also with Kaspersky IS aktive (but blocked) without errors.
The only difference is this error in the developer console:
upload_2016-11-10_8-7-16.webp

Here the screens from dev console to this error:
upload_2016-11-10_8-8-2.webp upload_2016-11-10_8-8-41.webp

In the other Xenforo (test installation) this error dont exist and I see no style problems.

:confused::unsure:
 
Xon updated Zend Redis Cache with a new update entry:

Feature Update

  • Redis Sentinel support for high-availability. See http://redis.io/topics/sentinel for more information.
  • Enable with:
    Code:
    $config['cache']['backendOptions']['sentinel_master_set'] = 'mymaster';
    $config['cache']['backendOptions']['server'] = '127.0.0.1:26379';
    • 'server' now points to a comma delimited list of sentinal servers to find the master.
    • 'mymaster' must match sentinel configuration.
    • the port must be explicitly listed

Read the rest of this update entry...
 
Ok, I can make a clean Testinstallation with a xenforo 1.5.11, Redis and your add-on. And then I come back and post the results. (y)
 
  • Like
Reactions: Xon
Atomic sliding new posts with api .. hmm, you lost me there :cry: I'll look into it thanx.

In the meantime, I installed everything on my server, and setup config.php etc but

H59Exow.jpg



Mehdi
 
This value is only populated when dealling with redis +3.0, 2.8 doesn't report those stats.

Ah, ok makes sense then.

Any other way to monitor if the thread list is transiting via redis or not ? I checked on phpRedisAdmin and I don't see it :/


Mehdi
 
Top Bottom