Skip to content

Unable to use redis cluster + sentinel with Magento 2.3.5 #161

Description

@henry1303

Hi,

We are trying to configure Magento 2.3.5 to use Redis cluster + sentinel, but we are getting an error when running bin/magento c:c (for example) :

ERR unknown command select, with args beginning with: 2

Here you have the configuration in our env.php file :

    'session' => [
    'save' => 'redis',
    'redis' => [
        'host' => 'redis-sentinel',
        'port' => '16379',
        'password' => '',
        'timeout' => '2.5',
        'persistent_identifier' => '',
        'database' => '0',
        'compression_threshold' => '2048',
        'compression_library' => 'gzip',
        'log_level' => '3',
        'max_concurrency' => '6',
        'break_after_frontend' => '5',
        'break_after_adminhtml' => '30',
        'first_lifetime' => '600',
        'bot_first_lifetime' => '60',
        'bot_lifetime' => '7200',
        'disable_locking' => '0',
        'min_lifetime' => '60',
        'max_lifetime' => '2592000',
        'sentinel_master' => 'master-node',
        'sentinel' => 'redis-sentinel:16379',
        'sentinel_connect_retries' => '5',
        'sentinel_verify_master' => '0',
        'load_from_slave' => '2',
        'retry_reads_on_master' => '1'
    ]
],
'cache' => [
    'frontend' => [
        'default' => [
            'id_prefix' => '40d_',
            'backend' => 'Cm_Cache_Backend_Redis',
            'backend_options' => [
                'server' => 'redis-sentinel',
                'database' => '1',
                'port' => '16379',
                'password' => '',
                'load_from_slave' => '2',
                'retry_reads_on_master' => '1'
            ]
        ],
        'page_cache' => [
            'id_prefix' => '40d_',
            'backend' => 'Cm_Cache_Backend_Redis',
            'backend_options' => [
                'server' => 'redis-sentinel',
                'database' => '2',
                'port' => '16379',
                'password' => '',
                'load_from_slave' => '2',
                'retry_reads_on_master' => '1'
            ]
        ]
    ]
]

Any idea what's wrong ?

Best regards,
Pierre

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions