Redis Session DB Shows Zero Keys for Sessions in Magento 1.9

cm-redissessionfull-page-cachemagento-1.9redis

When looking at the Redis Manager in the Back End, it always shows zero (o) keys for the sessions?

enter image description here

The .var/session is also empty.
Any idea on this?

We are running CE1.9.2.2.

<!-- 
<session_save><![CDATA[files]]></session_save>
-->

    <session_save><![CDATA[db]]></session_save>
    <redis_session>
        <host>127.0.0.1</host>
        <port>6379</port>
        <password></password>
        <timeout>2.5</timeout>
        <persistent></persistent>
        <db>1</db>
        <compression_threshold>2048</compression_threshold>
        <compression_lib>gzip</compression_lib>
        <log_level>1</log_level>
        <max_concurrency>6</max_concurrency>
        <break_after_frontend>5</break_after_frontend>
        <break_after_adminhtml>30</break_after_adminhtml>
        <first_lifetime>600</first_lifetime>
        <bot_first_lifetime>60</bot_first_lifetime>
        <bot_lifetime>7200</bot_lifetime>
        <disable_locking>0</disable_locking>
        <min_lifetime>60</min_lifetime>
        <max_lifetime>2592000</max_lifetime>
    </redis_session>

   <cache>
      <backend>Cm_Cache_Backend_Redis</backend>
      <backend_options>
        <server>127.0.0.1</server>
        <port>6379</port>
        <persistent></persistent>
        <database>2</database>
        <password></password>
        <force_standalone>0</force_standalone>
        <connect_retries>1</connect_retries>
        <read_timeout>10</read_timeout>
        <automatic_cleaning_factor>0</automatic_cleaning_factor>
        <compress_data>1</compress_data>
        <compress_tags>1</compress_tags>
        <compress_threshold>20480</compress_threshold>
        <compression_lib>gzip</compression_lib>
        <use_lua>0</use_lua>
      </backend_options>
    </cache>

Best Answer

do you have these files ?

app/etc/modules/Cm_RedisSession.xml
app/code/community/Cm/RedisSession

is it enabled?

 app/etc/modules/Cm_RedisSession.xml

<config>
<modules>
<Cm_RedisSession>
<active>false</active>
<codePool>community</codePool>
</Cm_RedisSession>
</modules>
</config>

also use lzf for compression

http://devdocs.magento.com/guides/m1x/ce18-ee113/using_redis.html#config

Important: The Cm_RedisSession module in CE 1.8 is disabled by default. Magento disables the module to avoid unnecessary connection tries to Redis when you choose to use file, database, or a different session storage method.

To enable Magento to use Redis, perform the following tasks:

Enable the Cm_RedisSession module.
Open magento-install-dir/app/etc/modules/Cm_RedisSession.xml in a text editor.
Change the value of to true.
Save your changes to Cm_RedisSession.xml and exit the text editor.
Modify magento-install-dir/app/etc/local.xml.
For configuration information, see the sample provided with Magento in magento-install-dir/app/etc/local.xml.additional and also see the Readme (session) and Readme (back end).
Flush the Magento cache in any of the following ways:
If you have access to the file system as the owner of the files in the Magento installation directory, change to that directory and enter rm -rf var/cache.
Log in to the Admin Panel as an administrator.
Click System > Cache Management, then click Flush Magento Cache at the top of the page.

Related Topic