Skip to content

Admin login always takes >30 sec when using Redis on 2.2.1 #12385

Closed
@keithbentrup

Description

@keithbentrup

Preconditions

  1. Magento 2.2.1
  2. Redis for session management

Steps to reproduce

  1. Login to the admin

Expected result

  1. Login should be immediate

Actual result

  1. Login takes >30 secs due to a recent commit that causes a new session id to be generated during the request

The regenerateId method was recently rewritten to generate a new session id when an admin logs into the admin dashboard.
The change in the session id causes the session read method of the redis session handling class to loop 60 times with a 500 ms sleep at the end of each loop before breaking out while it looks for the locking pid. This is because both session_regenerate_id and session_start increment the lock value 0->1->2 but only when the value is 1 will it break out otherwise it continues for $tries (60) with a 500 ms sleep between each one.

image
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Fixed in 2.3.xThe issue has been fixed in 2.3 release lineIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedReproduced on 2.2.xThe issue has been reproduced on latest 2.2 release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions