Closed
Description
Preconditions
- Magento 2.2.1
- Redis for session management
Steps to reproduce
- Login to the admin
Expected result
- Login should be immediate
Actual result
- 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.