1

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>

1 Answer 1

4

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.

3
  • app/etc/modules/Cm_RedisSession.xml was set to false after upgrading from 1.9.2.0 to 1.9.2.2. Never thought of that. Thanks for a comprehensive answer, working just perfect now.
    – Aknot
    Commented Nov 24, 2015 at 11:56
  • Just a note on the lzf compression, the server is running FreeBSD, and we are unsure that this lzf compression is installed on the server.
    – Aknot
    Commented Nov 24, 2015 at 13:10
  • nevermind, you can always install it, in fact it faster than gzip
    – MagenX
    Commented Nov 24, 2015 at 15:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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