0

I have an issue when it comes to using Redis as session cache.

If I use Redis for session caching, I lose the ability to go /setup page. When I remove Redis related code, the page loads just fine. I'm accessing the aforementioned page through System > Web Setup Wizard

I followed the instructions shown here, for configuring Magento 2 session cache with Redis.

Also, I'm using Docker for my setup. I have a container up and running for Redis. Two actually. One for session and another for page cache. config settings

Magento 2.2.6

These are the settings I use:

app/etc/env.php

'session' => [
    'save' => 'redis',
    'redis' => [
        'host' => 'redis-session',
        'port' => '6379',
        'password' => '',
        'timeout' => '2.5',
        'persistent_identifier' => '',
        'database' => '2',
        'compression_threshold' => '2048',
        'compression_library' => 'gzip',
        'log_level' => '1',
        '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'
    ]
]

docker-compose.yml

redis:
    image: redis
    hostname: redis
    ports:
      - 6379
    networks:
      - magento2-bwc-network
redis-session:
    hostname: redis-session
    image: redis
    ports:
      - 6379
    networks:
      - magento2-bwc-network

I checked the contents of both containers; redis container (page cache) has a bunch of keys inside it, and redis-session only has one (1) key.

What can I do to fix the issue?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.