colinmollenhour / Cm_Cache_Backend_Redis

A Zend_Cache backend for Redis with full support for tags (works great with Magento)
Other
389 stars 142 forks source link

Moved error when connecting to cluster #117

Closed robophil closed 7 years ago

robophil commented 7 years ago

Hi,

am connecting to a redis cluster on amazon elasticache. this is my configuration, but i keep getting this error, moved

my local.xml for magento

<redis_session>                       <!-- All options seen here are the defaults -->
            <host>xxx.xxx.xxx.xxx</host>            <!-- Specify an absolute path if using a unix socket -->
            <port>6379</port>
            <password></password>             <!-- Specify if your Redis server requires authentication -->
            <timeout>2.5</timeout>            <!-- This is the Redis connection timeout, not the locking timeout -->
            <persistent></persistent>         <!-- Specify unique string to enable persistent connections. E.g.: sess-db0; bugs with phpredis and php-fpm are known: https://github.com/nicolasff/phpredis/issues/70 -->
            <db>0</db>                        <!-- Redis database number; protection from accidental loss is improved by using a unique DB number for sessions -->
            <compression_threshold>2048</compression_threshold>  <!-- Set to 0 to disable compression (recommended when suhosin.session.encrypt=on); known bug with strings over 64k: https://github.com/colinmollenhour/Cm_Cache_Backend_Redis/issues/18 -->
            <compression_lib>gzip</compression_lib>              <!-- gzip, lzf, lz4 or snappy -->
            <log_level>1</log_level>               <!-- 0 (emergency: system is unusable), 4 (warning; additional information, recommended), 5 (notice: normal but significant condition), 6 (info: informational messages), 7 (debug: the most information for development/testing) -->
            <max_concurrency>6</max_concurrency>                 <!-- maximum number of processes that can wait for a lock on one session; for large production clusters, set this to at least 10% of the number of PHP processes -->
            <break_after_frontend>5</break_after_frontend>       <!-- seconds to wait for a session lock in the frontend; not as critical as admin -->
            <fail_after>10</fail_after>                          <!-- seconds after which we bail from attempting to obtain lock (in addition to break after time) -->
            <break_after_adminhtml>30</break_after_adminhtml>
            <first_lifetime>600</first_lifetime>                 <!-- Lifetime of session for non-bots on the first write. 0 to disable -->
            <bot_first_lifetime>60</bot_first_lifetime>          <!-- Lifetime of session for bots on the first write. 0 to disable -->
            <bot_lifetime>7200</bot_lifetime>                    <!-- Lifetime of session for bots on subsequent writes. 0 to disable -->
            <disable_locking>0</disable_locking>                 <!-- Disable session locking entirely. -->
            <min_lifetime>60</min_lifetime>                      <!-- Set the minimum session lifetime -->
            <max_lifetime>2592000</max_lifetime>                 <!-- Set the maximum session lifetime -->
        </redis_session>

the error i get

a:4:{i:0;s:29:"MOVED 13416 xxx.xxx.xxx.xxx:6379";i:1;s:1671:"#0 /var/www/html/projectx/.modman/Cm_RedisSession/credis/Client.php(934): Credis_Client->read_reply('hget')
#1 /var/www/html/projectx/.modman/Cm_Cache_Backend_Redis/Cm/Cache/Backend/Redis.php(232): Credis_Client->__call('hGet', Array)
#2 /var/www/html/projectx/.modman/Cm_Cache_Backend_Redis/Cm/Cache/Backend/Redis.php(232): Credis_Client->hGet('zc:k:bc1_CORE_C...', 'd')
#3 /var/www/html/projectx/lib/Zend/Cache/Core.php(306): Cm_Cache_Backend_Redis->load('bc1_CORE_CACHE_...', false)
#4 /var/www/html/projectx/lib/Varien/Cache/Core.php(158): Zend_Cache_Core->load('CORE_CACHE_OPTI...', false, false)
#5 /var/www/html/projectx/app/code/core/Mage/Core/Model/Cache.php(379): Varien_Cache_Core->load('CORE_CACHE_OPTI...')
#6 /var/www/html/projectx/app/code/core/Mage/Core/Model/Cache.php(476): Mage_Core_Model_Cache->load('core_cache_opti...')
#7 /var/www/html/projectx/app/code/core/Mage/Core/Model/Cache.php(520): Mage_Core_Model_Cache->_initOptions()
#8 /var/www/html/projectx/app/code/core/Mage/Core/Model/App.php(1183): Mage_Core_Model_Cache->canUse('config')
#9 /var/www/html/projectx/app/code/core/Mage/Core/Model/Config.php(419): Mage_Core_Model_App->useCache('config')
#10 /var/www/html/projectx/app/code/core/Mage/Core/Model/Config.php(299): Mage_Core_Model_Config->_canUseCacheForInit()
#11 /var/www/html/projectx/app/code/core/Mage/Core/Model/App.php(413): Mage_Core_Model_Config->loadModulesCache()
#12 /var/www/html/projectx/app/code/core/Mage/Core/Model/App.php(343): Mage_Core_Model_App->_initModules()
#13 /var/www/html/projectx/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#14 /var/www/html/projectx/index.php(136): Mage::run('', 'store')
#15 {main}";s:3:"url";s:1:"/";s:11:"script_name";s:10:"/index.php";}
Xon commented 7 years ago

Credis doesn't currently support Redis Clustering.

robophil commented 7 years ago

Alright then, thanks @Xon