Sunday, February 24, 2013

Magento : Session Storage


Typically, database servers are less utilised than web servers. Performance can usually be improved by moving session handling from the web server filesystem into the database server. Magento asks you whether you prefer a file or database session save type, but this is very easy to change in the XML. Open up /var/www/app/etc/local.xml, locate the <session_save> tags, and change the value so it looks like this (the default is <![CDATA[files]]>):

<session_save><![CDATA[db]]></session_save>
Another alternative is to use memcache for storing the sessions - this isn’t as persistent as the database store, but may be faster:

<session_save><![CDATA[memcache]]></session_save>
You can add details of your memcache server in the session save path:

<session_save_path><![CDATA[tcp://127.0.0.1:20?persistent=1&weight;=2&timeout;=10&retry;_interval=10]]></session_save_path>

No comments:

Post a Comment