Im not sure what you mean by that? If I comment "#" out the password it works. How do I get it to work using the password?I'm not sure why the Redis client bit lets you have a blank password
Im not sure what you mean by that? If I comment "#" out the password it works. How do I get it to work using the password?I'm not sure why the Redis client bit lets you have a blank password
Please use the minimal config which will set itself up correctly, as the other config example simply shows all the options. Just setting the password is enough for it to try to use a password, even if that password is empty.Im not sure what you mean by that? If I comment "#" out the password it works. How do I get it to work using the password?
When I use this config (disable saving), After I upgrade Redis to 3.0.7, it ask me to upgrade XenForo again, Why?
And I lost some cache also like bd widgets.
When redis restarts, it automatically loads any dump.rdb or appendonly.aof from /var/lib/redis/, you likely have a stale file in there.
Flush the cache via: "redis-cli flushall" , the affected bits should sort themselves out.
You can avoid this by deleting those files, or doing a "redis-cli save" before restarting or upgrading Redis.
So before shutdown server, I have to delete manually dump.rdb from /var/lib/redis/manually do it
Redis will skip loading the content, and XenForo will need to regenerate cached data. If the file exists, it can load the data and save rebuilding caches.What if I don't execute "redis-cli save"? Will dump.rdb will be created automatically?
The other way around;So before shutdown server, I have to delete manually dump.rdb from /var/lib/redis/
After sturtup I do not have to manually execute "redis-cli save" then?
Will be some problems if I do it that way? How long for xenforo to generate cache, and will there be some performance trouble till that finished?Redis will skip loading the content, and XenForo will need to regenerate cached data.
Yes, this will work.Problem is that I have to manually shutdown, but server automatically start after backup is finished.
So if I understand this correctly, my steps will be:
and when server start, redis will load last cache from manually saved dump.rdb from /var/lib/redis/ before shutdown
- redis-cli save (it will overwrite old dump.rdb)
- shutdown -h now
Correct, this will also work.Will be some problems if I do it that way? How long for xenforo to generate cache, and will there be some performance trouble till that finished?
If my configuration is:
I change appendonly yes to appendonly no
And comment this three rows:
#save 900 1
#save 300 10
#save 60 10000
then there is no automatically created/saved dump.rdb so before shutdown I have to allways save or left xenforo to generate own cache.
This is my configuration last month or two, but problem was two old files in /var/lib/redis/ before save lines commented and appendonly set to no.Correct, this will also work.
- Update bundled credis library to include support for more Sorted Set operations.
- This feature is not yet used by any of my public add-ons.
$config['cache']['backendOptions'] = array(
'server' => '127.0.0.1',
'port' => 6379,
'timeout' => 2.5,
'persistent' : '',
'force_standalone' => false,
'connect_retries' => 1,
'read_timeout' => '',
'password' => '',
'database' => 0,
'notMatchingTags' => false,
'compress_tags' => 1,
'compress_data' => 1,
'lifetimelimit' => 2592000,
'compress_threshold' => 20480,
'automatic_cleaning_factor' => 0,
'compression_lib' => '', // dynamically select first of; snappy,lzf,l4z,gzip
'use_lua' => false,
'sunion_chunk_size' => 500,
'lua_max_c_stack' => 5000,
);
$redis = XenForo_Application::getCache()->getBackend()->getCredis();
Please use the minimal example as the sample configuration. The rest are advanced options which I documented so I didn't need to go diving into code to find them.@Xon
I was using the Redis with minimal config with use_lua = true only.
But i see your example configuration file on the add-on file and it has very detail. Should i use them or do you advice it ? Especially you configured the use_lua as false. (it was true for me because of your previously advices)
Code:$config['cache']['backendOptions'] = array( 'server' => '127.0.0.1', 'port' => 6379, 'timeout' => 2.5, 'persistent' : '', 'force_standalone' => false, 'connect_retries' => 1, 'read_timeout' => '', 'password' => '', 'database' => 0, 'notMatchingTags' => false, 'compress_tags' => 1, 'compress_data' => 1, 'lifetimelimit' => 2592000, 'compress_threshold' => 20480, 'automatic_cleaning_factor' => 0, 'compression_lib' => '', // dynamically select first of; snappy,lzf,l4z,gzip 'use_lua' => false, 'sunion_chunk_size' => 500, 'lua_max_c_stack' => 5000, );
This is part of the RedisCache add-on, and is used todo raw communication to Redis bypassing the standard cache interface XF uses.Also what is doing that ? Will be available on xenforo 2.x ?
Code:$redis = XenForo_Application::getCache()->getBackend()->getCredis();
Okay i will continue to use the minimal config BUT i have two question.Please use the minimal example as the sample configuration. The rest are advanced options which I documented so I didn't need to go diving into code to find them.
This is part of the RedisCache add-on, and is used todo raw communication to Redis bypassing the standard cache interface XF uses.
$redis = XenForo_Application::getCache()->getBackend()->getCredis();
As long as you have a recent version of Redis (+2.4) yes, it should be true.Okay i will continue to use the minimal config BUT i have two question.
1. Should we use the "use_lua = true" for this add-on and xenforo ? What is the difference that it is true or false
That is an example of how to access the raw redis object for developers. Normally users should not use it.2. Is it safe to use that code end of the config.php ?
Code:$redis = XenForo_Application::getCache()->getBackend()->getCredis();
- Support for SVG Template, and aging out cached SVG's on a styel change
Error Info
CredisException: protocol error, got 'a' as reply type byte - library/Redis/lib/Credis/Client.php:1074
Generated By: Unknown Account, Today at 12:00 PM
Stack Trace
#0 /library/SV/RedisCache/RedisDataRegistry.php(175): Credis_Client->__call('exec', Array)
#1 /library/XenForo/Dependencies/Abstract.php(147): XenForo_Model_DataRegistry->getMulti(Array)
#2 /library/XenForo/FrontController.php(127): XenForo_Dependencies_Abstract->preLoadData()
#3 /index.php(13): XenForo_FrontController->run()
#4 {main}
Request State
array(3) {
["url"] => string(67) "http://www.site.net/t/threadtitle.85422/"
["_GET"] => array(1) {
["/t/naruto-fight-shadow-blade-x-v0-4-0_85422/"] => string(0) ""
}
["_POST"] => array(0) {
}
}
Error Info
CredisException: read error on connection - library/Redis/lib/Credis/Client.php:1074
Generated By: Unknown Account, Today at 12:00 PM
Stack Trace
#0 /library/Redis/lib/Credis/Client.php(608): Credis_Client->__call('select', Array)
#1 /library/Redis/Cm/Cache/Backend/Redis.php(144): Credis_Client->select(0)
#2 /library/Zend/Cache.php(153): Cm_Cache_Backend_Redis->__construct(Array)
#3 /library/Zend/Cache.php(94): Zend_Cache::_makeBackend('Redis', Array, false, false)
#4 /library/XenForo/Application.php(763): Zend_Cache::factory('Core', 'Redis', Array, Array)
#5 /library/XenForo/Application.php(973): XenForo_Application->loadCache(Object(Zend_Config))
#6 /library/XenForo/Application.php(1004): XenForo_Application->lazyLoad('cache', NULL)
#7 /library/XenForo/Application.php(1649): XenForo_Application::get('cache')
#8 /library/XenForo/Model.php(146): XenForo_Application::getCache()
#9 /library/SV/RedisCache/RedisDataRegistry.php(152): XenForo_Model->_getCache(true)
#10 /library/XenForo/Dependencies/Abstract.php(147): XenForo_Model_DataRegistry->getMulti(Array)
#11 /library/XenForo/FrontController.php(127): XenForo_Dependencies_Abstract->preLoadData()
#12 /index.php(13): XenForo_FrontController->run()
#13 {main}
Request State
array(3) {
["url"] => string(49) "http://www.site.net/t/threadtitle.99150/page-19"
["_GET"] => array(1) {
["/t/smart-bug_99150/page-19"] => string(0) ""
}
["_POST"] => array(0) {
}
}
We use essential cookies to make this site work, and optional cookies to enhance your experience.