1

Hello @all.

Using Magento version 2.4.2 here getting the issue on the fronted user login successfully then the user moves to multiple tabs/category LIKE [ men, brands, etc.]. while moving he found he was logged out.

Note: Actually using multiple instances once heavy load on server1 shifts to server 2 that's the time the user logout.

Change the cookies/session time for 3 days. but still getting issues. Can anyone please guide me on this?

Thank you in advance :)

7
  • Could you kindly verify that the settings are configured for the correct store view? Additionally, please review the logs for any errors related to cookies. Oct 12, 2023 at 7:53
  • Are you using redis cache in your project? Oct 12, 2023 at 9:56
  • No redis cache using the varnish
    – Vivek
    Oct 19, 2023 at 6:26
  • @arjun sorry not using any catche.
    – Vivek
    Oct 19, 2023 at 6:37
  • @GrazittiDev Edit the Question please review then please
    – Vivek
    Oct 19, 2023 at 6:51

1 Answer 1

0

You can update the setting in env.php for Redis like given below

'session' => [
    'save' => 'redis',
    'redis' => [
        'host' => 'hostname',
        'port' => '6379',
        'password' => '',
        'timeout' => '2.5',
        'persistent_identifier' => '',
        'database' => '2',
        'compression_threshold' => '2048',
        'compression_library' => 'gzip',
        'log_level' => '1',
        'max_concurrency' => '20',
        'break_after_frontend' => '5',
        'break_after_adminhtml' => '30',
        'first_lifetime' => '600',
        'bot_first_lifetime' => '60',
        'bot_lifetime' => '7200',
        'disable_locking' => '1',
        'min_lifetime' => '60',
        'max_lifetime' => '2592000'
    ]
],
'cache' => [
    'frontend' => [
        'default' => [
            'backend' => 'Cm_Cache_Backend_Redis',
            'backend_options' => [
                'server' => 'hostname',
                'database' => '0',
                'port' => '6379',
                'password' => ''
            ]
        ],
        'page_cache' => [
            'backend' => 'Cm_Cache_Backend_Redis',
            'backend_options' => [
                'server' => 'hostname',
                'database' => '1',
                'port' => '6379',
                'compress_data' => '0',
                'password' => ''
            ]
        ]
    ]
], 
'cache_types' => [
    'config' => 1,
    'layout' => 1,
    'block_html' => 1,
    'collections' => 1,
    'reflection' => 1,
    'db_ddl' => 1,
    'compiled_config' => 1,
    'eav' => 1,
    'customer_notification' => 1,
    'config_integration' => 1,
    'config_integration_api' => 1,
    'full_page' => 1,
    'config_webservice' => 1,
    'translate' => 1,
    'vertex' => 1
],

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.