Magento – How to Disable Redis on Localhost

localhostmagento-enterpriserediswamp

I can't turn off Redis within my Magento/Wampserver Installation. I have removed all lines referencing Redis in local.xml and it already shows as disabled in cm_redissessions.xml – But, when I visit the site via Wampserver I get a "There has been an error processing your request" page with the following associated error report. How do I disable Redis for a local installation of Magento?

a:4:{i:0;s:44:"Connection to Redis failed after 6 failures.";i:1;s:1809:"#0 C:\wamp\www\mysite\lib\Credis\Client.php(362): Credis_Client->connect()
#1 C:\wamp\www\mysite\lib\Credis\Client.php(362): Credis_Client->connect()
#2 C:\wamp\www\mysite\lib\Credis\Client.php(362): Credis_Client->connect()
#3 C:\wamp\www\mysite\lib\Credis\Client.php(362): Credis_Client->connect()
#4 C:\wamp\www\mysite\lib\Credis\Client.php(362): Credis_Client->connect()
#5 C:\wamp\www\mysite\lib\Credis\Client.php(447): Credis_Client->connect()
#6 C:\wamp\www\mysite\lib\Credis\Client.php(440): Credis_Client->__call('select', Array)
#7 C:\wamp\www\mysite\lib\Cm\Cache\Backend\Redis.php(117): Credis_Client->select(0)
#8 C:\wamp\www\mysite\lib\Zend\Cache.php(153): Cm_Cache_Backend_Redis->__construct(Array)
#9 C:\wamp\www\mysite\lib\Zend\Cache.php(94): Zend_Cache::_makeBackend('Mage_Cache_Back...', Array, true, true)
#10 C:\wamp\www\mysite\app\code\core\Mage\Core\Model\Cache.php(137): Zend_Cache::factory('Varien_Cache_Co...', 'Mage_Cache_Back...', Array, Array, true, true, true)
#11 C:\wamp\www\mysite\app\code\core\Mage\Core\Model\Config.php(1348): Mage_Core_Model_Cache->__construct(Array)
#12 C:\wamp\www\mysite\app\Mage.php(463): Mage_Core_Model_Config->getModelInstance('core/cache', Array)
#13 C:\wamp\www\mysite\app\code\core\Mage\Core\Model\App.php(401): Mage::getModel('core/cache', Array)
#14 C:\wamp\www\mysite\app\code\core\Mage\Core\Model\App.php(295): Mage_Core_Model_App->_initCache(Array)
#15 C:\wamp\www\mysite\app\code\core\Mage\Core\Model\App.php(337): Mage_Core_Model_App->baseInit(Array)
#16 C:\wamp\www\mysite\app\Mage.php(684): Mage_Core_Model_App->run(Array)
#17 C:\wamp\www\mysite\index.php(87): Mage::run('', 'store')
#18 {main}";s:3:"url";s:1:"/";s:11:"script_name";s:10:"/index.php";}

Best Answer

In order to stop using REDIS, you simply need to remove the references from your local.xml. It's one thing to delete and start over but your must understand what you actually needed to do.

If you look you will see either one or both of the bellow sections, this is what you need to remove. Once it is removed clear your cache and you will be good to go.

<cache>
        <backend>Cm_Cache_Backend_Redis</backend>
        <backend_options>
            <server>127.0.0.1</server> <!-- or absolute path to unix socket for better performance -->
            <port>6379</port>
            <database>0</database>
            <password></password>
            <force_standalone>0</force_standalone>  <!-- 0 for phpredis, 1 for standalone PHP -->
            <connect_retries>1</connect_retries>    <!-- Reduces errors due to random connection failures -->
            <automatic_cleaning_factor>0</automatic_cleaning_factor> <!-- Disabled by default -->
            <compress_data>1</compress_data>  <!-- 0-9 for compression level, recommended: 0 or 1 -->
            <compress_tags>1</compress_tags>  <!-- 0-9 for compression level, recommended: 0 or 1 -->
            <compress_threshold>20480</compress_threshold>  <!-- Strings below this size will not be compressed -->
            <compression_lib>gzip</compression_lib> <!-- Supports gzip, lzf and snappy -->
            <persistent>1</persistent> <!-- persistence value, 0: not in use, > 0 used as persistence ID -->
        </backend_options>
    </cache>



<!-- example of redis full page cache -->
    <full_page_cache>
        <backend>Cm_Cache_Backend_Redis</backend>
        <backend_options>
            <server>127.0.0.1</server> <!-- or absolute path to unix socket for better performance -->
            <port>6379</port>
            <database>1</database>
            <password></password>
            <force_standalone>0</force_standalone>  <!-- 0 for phpredis, 1 for standalone PHP -->
            <connect_retries>1</connect_retries>    <!-- Reduces errors due to random connection failures -->
            <automatic_cleaning_factor>0</automatic_cleaning_factor> <!-- Disabled by default -->
            <!-- in FPC data is already gzipped, no need to do this twice -->
            <compress_data>0</compress_data>  <!-- 0-9 for compression level, recommended: 0 or 1 -->
            <compress_tags>1</compress_tags>  <!-- 0-9 for compression level, recommended: 0 or 1 -->
            <compress_threshold>20480</compress_threshold>  <!-- Strings below this size will not be compressed -->
            <compression_lib>gzip</compression_lib> <!-- Supports gzip, lzf and snappy -->
            <lifetimelimit>43200</lifetimelimit> <!-- set lifetime for keys without TTL -->
            <persistent>2</persistent>
        </backend_options>
    </full_page_cache>
Related Topic