Showing results for 
Search instead for 
Did you mean: 

Cookie issues with Magento 2

Cookie issues with Magento 2

I set the customer cookie to 1 year (525600) under stores/config/customer/customer config for both Online Minutes Interval and Customer Data Lifetime.

Magento still logs my customers out after 15 minutes.


I tried changing session.gc_maxlifetime from it's default 1440 to 525600 and it didn't do anything.


I then tried changing session.cookie_lifetime to 525600, and that throws up errors, and breaks the application.


I tried changing my app/etc/env.php "session" to

   'session' => [
        'save' => 'files'
        'save_path' => '/var/session'

I use /pub as doc root, so I created a var/session directory in /pub, but that didn't change anything.


How can I keep my customers logged in for a long time without breaking my site?


Thank you


Re: Cookie issues with Magento 2

Try       Stores > Configuration > General > Web > Default Cookie Settings > Cookie Lifetime > 


Increase lifetime as per your requirement then check.