1

I have two virtual machines running magento: one just for the frontend and one for the admin. They are connected to two Redis instances: a virtual machine for sessions (db 0 for frontend and db 1 for backend) and another one for cache (db 0 for both).

If I change configuration giving db1 for backend cache, everything works fine. Anyway there are advantages using the same db: I can control the frontend cache by the administration panel, and it get warmed sooner.

The mysql db is the same and the code is always synched between the two machines and distribution packages. Server configuration includes php7.1-fpm.

The problem: when using just one cache db, somehow an error like the following is thrown, and the sessions are cleared (keeping the same session ids): Redis configuration does not exist, falling back to MySQL handler. I see this is an error from session handler that points to a cache issue. Anyway, I see no entry in the core_session table (maybe because of Turpentine's Varnish?). What could be the cause of this issue?

Here is the local.xml configuration for both servers (the only thing that has been copied manually - configuration as suggested from CM):

       <session_save>db</session_save>
    <redis_session>
        <host>192.168.x.y</host>
        <port>z</port>
        <password></password>
        <timeout>2.5</timeout>
        <persistent></persistent>
        <db>0|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>
        <fail_after>10</fail_after>
        <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>
    <log_exceptions>1</log_exceptions>
    <disable_locking>1</disable_locking>
    </redis_session>



<cache>
        <backend>Cm_Cache_Backend_Redis</backend>
        <backend_options>
            <server>192.168.x.n</server>
            <port>m</port>
            <persistent></persistent>
            <database>0</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>1</use_lua>
        </backend_options>
    </cache>
0

This question had wrong premises. The two machines were using a different cache database on the same server: that caused the issue. If you are in the same situation, just check the configuration again and again, and be faithful.

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.