Skip to content

Losing session ocassionally #13511

@albertomario

Description

@albertomario

We have some problems with one of our projects. Ocassionally, look's like magento simply redirects to login page when trying to checkout. Is very hard for us to find the problem because happens only sometimes. Because the context of the problem, at first time look hard to reproduce or investigate, but we also found a reproductive method that's generate the same result as the random one. That if you go to /checkout page and simply opens multiple tabs when and paste the same /checkout address into it, the session is lost in browser. This should not be a problem for a customer with a "normal behavior", but neither is normal. The session should be persistent in browser regardless how many requests from how many tabs are opened.

Preconditions

  1. Magento 2.2.2
  2. Varnish
  3. Redis

Steps to reproduce

  1. Login as customer
  2. Add a product in cart
  3. Go to /checkout page
  4. Open tab - paste - enter (multiple times times - 5-6 tabs for example)

Expected result

  1. Checkout page on each tab with session intact.

Actual result

The session is for the current customer and have to re-authenticate into shop
Before lossing the session a rest request to /rest/default/V1/carts/mine/estimate-shipping-methods respond with 401 status code (likely because the cookie don't hit it)

Video link with the method used to reproduce the problem.

Magento2 Lossing session

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions