1
<cache>
             <backend><![CDATA[memcached]]></backend>
             <memcached><!-- memcached cache backend related config -->
                 <servers><!-- any number of server nodes can be included -->
                     <server>
                         <host><![CDATA[server1]]></host>
                         <port><![CDATA[11211]]></port>
                         <persistent><![CDATA[1]]></persistent>
                         <weight><![CDATA[1]]></weight>
                         <timeout><![CDATA[10]]></timeout>
                         <retry_interval><![CDATA[10]]></retry_interval>
                         <status><![CDATA[1]]></status>
                     </server>
                     <server>
                         <host><![CDATA[server2]]></host>
                         <port><![CDATA[11211]]></port>
                         <persistent><![CDATA[1]]></persistent>
                         <weight><![CDATA[1]]></weight>
                         <timeout><![CDATA[10]]></timeout>
                         <retry_interval><![CDATA[10]]></retry_interval>
                         <status><![CDATA[1]]></status>
                     </server>
                 </servers>

             </memcached>
         </cache>

I am trying to configure two memcache servers with my magento. It works perfectly with one, But once i add the second one it gives me following error

Fatal error: Call to a member function setSaveHandler() on a non-object in app/code/local/Mage/Core/Model/Session/Abstract/Varien.php on line 53
1

First of all, I see, that core file app/code/core/Mage/Core/Model/Session/Abstract/Varien.php is rewrited in local code pool. Please, do diff between them.

Check, how was configured sessions in local.xml? Seems your sessions stores in DB, because described error can happens, when Magento unable to get core/session instance

        case 'db':
            $moduleName = 'user';
            /* @var $sessionResource Mage_Core_Model_Resource_Session */
            $sessionResource = Mage::getResourceSingleton('core/session');
            $sessionResource->setSaveHandler();
            break;
  • There is not much difference. added one empty case inside function start, and with one memcache server it is has been working and as is still working fine. The moment i add the second <server> it will throw the error – zamil Sep 4 '14 at 14:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.