Resource icon

Zend Redis Cache 1.6.0

No permission to download
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

Make sure you run a yum update to be sure your current version is updated as Xon mentioned. I had this issue because I didn't have the most updated version.
 
  • Like
Reactions: Xon
Could i get maybe a walkthrough on how to implement this while using cpanel?
i've installed it, but says redis is disabled on the main admin page.

i'm using php 7.0 and have redis checked in the php options.
also not seeing an options page for the addon, not sure if there should be one or not.
 
Could i get maybe a walkthrough on how to implement this while using cpanel?
i've installed it, but says redis is disabled on the main admin page.

i'm using php 7.0 and have redis checked in the php options.
also not seeing an options page for the addon, not sure if there should be one or not.
Please see; https://xenforo.com/help/cache/

And have a look at the FAQ for this add-on; specifically Q: Redis Configuration and Q: Sample XenForo Configuration

XenForo sample configuration;
Code:
$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');

Change the server & port as required, but those defaults should be correct.
 
guess i'm missing something. still says its not working
i had this issue before with their exmaples on the cache, like if i add
Code:
$config['cache']['enabled'] = true;
$config['cache']['frontend'] = 'Core';
$config['cache']['frontendOptions']['cache_id_prefix'] = 'xf_';
the site stops working
using just what you posted above, redis still doesn't say it's working.

do i need to download, upload, and install this like i would any other script? http://download.redis.io/releases/redis-3.2.6.tar.gz
 
@Xon, I have this up and running thanks to Matt who optimized my server and we now run Redis+your addon, I wanted to know, can I update your add-on just like any other add-on or is there anything else I need to do on the backend? As in, if I update the add-on (the board will be closed during update, of course) do I need to do something to Redis on the backend or anything or just run the update of the add-on like any other normal add-on? Thanks!
 
Xon updated Zend Redis Cache with a new update entry:

1.3.0 - Feature Update

  • "Load from slave" option now supported for front-end read workloads (excludes admin pages).
    • This means stale reads are possible!
  • Option to load from a local slave, instead of hitting a remote slave.
    • APCu is used to store the list of local IPs fetched via
      Code:
      shell_exec("hostname --all-ip-addresses")
    • If someone knows of a better way of getting all machine IPs vai PHP, please tell me.

Read the rest of this update entry...
 
Last edited:
@Xon
After newest update tons of errors
Code:
Server Error Log
Error Info
Zend_Cache_Exception: Datas must be string or set automatic_serialization = true - library/Zend/Cache.php:209
Generated By: Unknown Account, 1 minute ago
Stack Trace
#0 /home/nginx/domains/pijanitvor.com/public/library/Zend/Cache/Core.php(360): Zend_Cache::throwException('Datas must be s...')
#1 /home/nginx/domains/pijanitvor.com/public/library/SV/OptimizedListQueries/XenForo/ControllerPublic/Forum.php(57): Zend_Cache_Core->save(false, 'xfredis_session...', Array, '150')
#2 /home/nginx/domains/pijanitvor.com/public/library/XenForo/ControllerPublic/Forum.php(130): SV_OptimizedListQueries_XenForo_ControllerPublic_Forum->_getSessionActivityList()
#3 /home/nginx/domains/pijanitvor.com/public/library/PrefixEss/XenForo/ControllerPublic/Forum.php(7): XenForo_ControllerPublic_Forum->actionIndex()
#4 /home/nginx/domains/pijanitvor.com/public/library/SV/TrendingContentTags/XenForo/ControllerPublic/Forum.php(7): PrefixEss_XenForo_ControllerPublic_Forum->actionIndex()
#5 /home/nginx/domains/pijanitvor.com/public/library/FS/Events/ControllerPublic/Forum.php(5): SV_TrendingContentTags_XenForo_ControllerPublic_Forum->actionIndex()
#6 /home/nginx/domains/pijanitvor.com/public/library/NFLJ/Showcase/XenForo/ControllerPublic/Forum.php(7): FS_Events_ControllerPublic_Forum->actionIndex()
#7 /home/nginx/domains/pijanitvor.com/public/library/Andy/TodaysBirthdays/ControllerPublic/Forum.php(14): NFLJ_Showcase_XenForo_ControllerPublic_Forum->actionIndex()
#8 /home/nginx/domains/pijanitvor.com/public/library/XenForo/FrontController.php(351): Andy_TodaysBirthdays_ControllerPublic_Forum->actionIndex()
#9 /home/nginx/domains/pijanitvor.com/public/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#10 /home/nginx/domains/pijanitvor.com/public/index.php(13): XenForo_FrontController->run()
#11 {main}
Request State
array(3) {
  ["url"] => string(27) "https://www.pijanitvor.com/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}


Code:
Server Error Log
Error Info
Zend_Cache_Exception: Datas must be string or set automatic_serialization = true - library/Zend/Cache.php:209
Generated By: Unknown Account, 4 minutes ago
Stack Trace
#0 /home/nginx/domains/pijanitvor.com/public/library/Zend/Cache/Core.php(360): Zend_Cache::throwException('Datas must be s...')
#1 /home/nginx/domains/pijanitvor.com/public/library/SV/OptimizedListQueries/XenForo/ControllerPublic/Forum.php(57): Zend_Cache_Core->save(false, 'xfredis_session...', Array, '150')
#2 /home/nginx/domains/pijanitvor.com/public/library/XenForo/ControllerPublic/Forum.php(130): SV_OptimizedListQueries_XenForo_ControllerPublic_Forum->_getSessionActivityList()
#3 /home/nginx/domains/pijanitvor.com/public/library/PrefixEss/XenForo/ControllerPublic/Forum.php(7): XenForo_ControllerPublic_Forum->actionIndex()
#4 /home/nginx/domains/pijanitvor.com/public/library/SV/TrendingContentTags/XenForo/ControllerPublic/Forum.php(7): PrefixEss_XenForo_ControllerPublic_Forum->actionIndex()
#5 /home/nginx/domains/pijanitvor.com/public/library/FS/Events/ControllerPublic/Forum.php(5): SV_TrendingContentTags_XenForo_ControllerPublic_Forum->actionIndex()
#6 /home/nginx/domains/pijanitvor.com/public/library/NFLJ/Showcase/XenForo/ControllerPublic/Forum.php(7): FS_Events_ControllerPublic_Forum->actionIndex()
#7 /home/nginx/domains/pijanitvor.com/public/library/Andy/TodaysBirthdays/ControllerPublic/Forum.php(14): NFLJ_Showcase_XenForo_ControllerPublic_Forum->actionIndex()
#8 /home/nginx/domains/pijanitvor.com/public/library/XenForo/FrontController.php(351): Andy_TodaysBirthdays_ControllerPublic_Forum->actionIndex()
#9 /home/nginx/domains/pijanitvor.com/public/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#10 /home/nginx/domains/pijanitvor.com/public/index.php(13): XenForo_FrontController->run()
#11 {main}
Request State
array(3) {
  ["url"] => string(27) "https://www.pijanitvor.com/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}

This is my settings in config.php if it could help

Code:
$config['cache']['frontendOptions'] = array(
'caching' => true,
'cache_id_prefix' => 'xfredis_',
'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');

Code:
Redis Information
Version: 3.2.6
phpredis version: 3.1.1RC2
Using Lua: Yes
To Redis (kbps): 2
From Redis (kbps): 291
Operations per second: 22
DB 0 Keys: 7,363
DB 0 Average TTL: 33,836,472
 
Thank you for your fixing @Xon

Btw, There are a syntax error in your config.redis-example.php file for this add-on.

'persistent' : '',

should change to

'persistent' => '',
 
  • Like
Reactions: Xon
@Xon I keep getting the following error

PHP:
CredisException: read error on connection - library/Redis/lib/Credis/Client.php:1104
Generated By: Unknown Account, Today at 3:54 AM

Stack Trace
#0 /home/xxxxxx/public_html/library/SV/RedisCache/RedisDataRegistry.php(198): Credis_Client->__call('exec', Array)
#1 /home/xxxxxx/public_html/library/XenForo/Dependencies/Abstract.php(147): XenForo_Model_DataRegistry->getMulti(Array)
#2 /home/xxxxxx/public_html/library/XenForo/FrontController.php(127): XenForo_Dependencies_Abstract->preLoadData()
#3 /home/xxxxxx/public_html/index.php(13): XenForo_FrontController->run()
#4 {main}

PHP:
CredisException: read error on connection - library/Redis/lib/Credis/Client.php:1104
Generated By: Unknown Account, Today at 3:54 AM

Stack Trace
#0 /home/xxxxxx/public_html/library/Redis/Cm/Cache/Backend/Redis.php(345): Credis_Client->__call('hget', Array)
#1 /home/xxxxxx/public_html/library/Zend/Cache/Core.php(303): Cm_Cache_Backend_Redis->load('oroj_session_78...', false)
#2 /home/xxxxxx/public_html/library/XenForo/Session.php(782): Zend_Cache_Core->load('oroj_session_78...')
#3 /home/xxxxxx/public_html/library/XenForo/Session.php(485): XenForo_Session->getSessionFromSource('786dc4074b615ec...')
#4 /home/xxxxxx/public_html/library/XenForo/Session.php(469): XenForo_Session->_setup('786dc4074b615ec...', '\x87\x00N\xD7')
#5 /home/xxxxxx/public_html/library/XenForo/Session.php(324): XenForo_Session->start()
#6 /home/xxxxxx/public_html/library/XenForo/Session.php(257): XenForo_Session::getPublicSession(Object(Zend_Controller_Request_Http))
#7 /home/xxxxxx/public_html/library/XenForo/Controller.php(293): XenForo_Session::startPublicSession(Object(Zend_Controller_Request_Http))
#8 /home/xxxxxx/public_html/library/XenForo/Controller.php(306): XenForo_Controller->_setupSession('Index')
#9 /home/xxxxxx/public_html/library/XenForo/FrontController.php(350): XenForo_Controller->preDispatch('Index', 'XenForo_Control...')
#10 /home/xxxxxx/public_html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#11 /home/xxxxxx/public_html/index.php(13): XenForo_FrontController->run()
#12 {main}

About 5-6 such errors pop up randomly every six to eight hours (all the errors pop up together at the same minute).

Edit: This is very recent, there wasn't any issues previously.
 
I updated to the latest add-on version (was one version behind), I'll see if this repeats again and get back to you.
 
@Divvens try disabling anything doing disk IO. Try find any "save" statements and comment them out and don't use the appending log stuff. If it goes away, then it was an IO issue.
 
@Divvens try disabling anything doing disk IO. Try find any "save" statements and comment them out and don't use the appending log stuff. If it goes away, then it was an IO issue.
Noob question. But which file do I comment it out from? Or is it on Redis config/settings? It had stopped for a couple of days and not is back and pops up very often.
 
Top Bottom