How to install Redis server on CentOS 8

[[email protected] ~]# dnf list all | grep ^redis redis.x86_64 5.0.3-2.module_el8.2.0+318+3d7e67ea AppStream redis-devel.x86_64 5.0.3-2.module_el8.2.0+318+3d7e67ea AppStream redis-doc.noarch 5.0.3-2.module_el8.2.0+318+3d7e67ea AppStream [[email protected] ~]# https://www.youtube.com/watch?v=db7iWl5__lQ [[email protected] ~]# dnf install redis Last metadata expiration check: 0:01:42 ago on Mon 07 Sep 2020 05:56:36 PM IST. Dependencies resolved. ============================================================================================================================================= Package Architecture Version Repository Size ============================================================================================================================================= Installing: redis x86_64 5.0.3-2.module_el8.2.0+318+3d7e67ea AppStream 925 k Enabling module streams: redis 5 Transaction Summary ============================================================================================================================================= Install 1 Package Total download size: 925…

[Solved] Magento Redis OOM command not allowed when used maxmemory

Error:- OOM command not allowed when used memory > ‘maxmemory’. Trace: There has been an error processing your request #0 /home/the-d2/public_html/releases/20200103111883/magento/lib/Cm/Cache/Backend/Redis.php(349): Credis_Client->__call(‘exec’, Array) #1 /home/the-d2/public_html/releases/20200103111883/magento/lib/Cm/Cache/Backend/Redis.php(349): Credis_Client->exec() #2 /home/the-d2/public_html/releases/20200103111883/magento/lib/Zend/Cache/Core.php(390): Cm_Cache_Backend_Redis->savex’0xx…’, Array, NULL) #3 /home/the-d2/public_html/releases/20200103111883/magento/lib/Varien/Cache/Core.php(145): Zend_Cache_Core->save(‘xx…’, ‘xx…’, Array, NULL, 8) #4 /home/the-d2/public_html/releases/20200103111883/magento/app/code/core/Mage/Core/Model/Cache.php(403): Varien_Cache_Core->save x Array, NULL) #5 /home/the-d2/public_html/releases/20200103111883/magento/app/code/core/Enterprise/PageCache/Helper/Form/Key.php(117): Mage_Core_Model_Cache->save x Array) #6 /home/the-d2/public_html/releases/20200103111883/magento/app/code/core/Enterprise/PageCache/Model/Processor.php(424): Enterprise_PageCache_Helper_Form_Key::getFormKey(true) #7 /home/the-d2/public_html/releases/20200103111883/magento/app/code/core/Enterprise/PageCache/Model/Processor.php(340): Enterprise_PageCache_Model_Processor->_processContent(‘\nextractContent(false) #9 /home/the-d2/public_html/releases/20200103111883/magento/app/code/core/Mage/Core/Model/App.php(367): Mage_Core_Model_Cache->processRequest() #10 /home/the-d2/public_html/releases/20200103111883/magento/app/Mage.php(687): Mage_Core_Model_App->run(Array) #11 /home/the-d2/public_html/releases/magento/index.php(89): Mage::run(”, ‘store’) #12 {main} Error log record…

[Solved] Fatal error: Uncaught CredisException: Connection to Redis 127.0.0.1:6379 failed. Last Error : (111) Connection refused

Error:- Fatal error: Uncaught CredisException: Connection to Redis 127.0.0.1:6379 failed after 2 failures.Last Error : (111) Connection refused in /home/the-d2/public_html/vendor/colinmollenhour/credis/Client.php:463 Stack trace: #0 /home/the-d2/public_html/vendor/colinmollenhour/credis/Client.php(459): Credis_Client->connect() #1 /home/the-d2/public_html/vendor/colinmollenhour/credis/Client.php(792): Credis_Client->connect() #2 /home/the-d2/public_html/vendor/colinmollenhour/cache-backend-redis/Cm/Cache/Backend/Redis.php(432): Credis_Client->__call(‘hGet’, Array) #3 /home/the-d2/public_html/vendor/magento/zendframework1/library/Zend/Cache/Core.php(306): Cm_Cache_Backend_Redis->load(’33d_GLOBAL__DIC…’, false) #4 /home/the-d2/public_html/vendor/magento/framework/Cache/Frontend/Adapter/Zend.php(39): Zend_Cache_Core->load(’33d_GLOBAL__DIC…’) #5 /home/the-d2/public_html/vendor/magento/framework/Cache/Frontend/Decorator/Bare.php(65): Magento\Framework\Cache\Frontend\Adapter\Z in /home/the-d2/public_html/vendor/colinmollenhour/credis/Client.php on line 463 Solution:- Try restarting the redis service and flush redis cache. # service redis restart # redis-cli flushall  

[Solved] Connection to Redis failed after x failures Client.php Credis_Client->connect

Issue:- [[email protected] ~]# cd /home/the-d2/public_html/var/report/ [[email protected] report]# cat 118233337366 a:4:{i:0;s:44:”Connection to Redis failed after 2 failures.”;i:1;s:1529:”#0 /home/the-d2/public_html/lib/Credis/Client.php(362): Credis_Client->connect() #1 /home/the-d2/public_html/lib/Credis/Client.php(447): Credis_Client->connect() #2 /home/the-d2/public_html/lib/Credis/Client.php(440): Credis_Client->__call(‘select’, Array) #3 /home/the-d2/public_html/lib/Cm/Cache/Backend/Redis.php(117): Credis_Client->select(0) #4 /home/the-d2/public_html/lib/Zend/Cache.php(153): Cm_Cache_Backend_Redis->__construct(Array) #5 /home/the-d2/public_html/lib/Zend/Cache.php(94): Zend_Cache::_makeBackend(‘Cm_Cache_Backen…’, Array, true, true) #6 /home/the-d2/public_html/app/code/core/Mage/Core/Model/Cache.php(137): Zend_Cache::factory(‘Varien_Cache_Co…’, ‘Cm_Cache_Backen…’, Array, Array, true, true, true) #7 /home/the-d2/public_html/app/code/core/Mage/Core/Model/Config.php(1354): Mage_Core_Model_Cache->__construct(Array) #8 /home/the-d2/public_html/app/Mage.php(463): Mage_Core_Model_Config->getModelInstance(‘core/cache’, Array) #9 /home/the-d2/public_html/app/code/core/Mage/Core/Model/App.php(401): Mage::getModel(‘core/cache’, Array) #10 /home/the-d2/public_html/app/code/core/Mage/Core/Model/App.php(295): Mage_Core_Model_App->_initCache(Array) #11 /home/the-d2/public_html/app/code/core/Mage/Core/Model/App.php(337): Mage_Core_Model_App->baseInit(Array) #12 /home/the-d2/public_html/app/Mage.php(684): Mage_Core_Model_App->run(Array) #13 /home/the-d2/public_html/index.php(98): Mage::run(”, ‘store’)…