Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
keithbentrup opened this issue Nov 21, 2017 · 5 comments
Closed

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

keithbentrup opened this issue Nov 21, 2017 · 5 comments
Labels
Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release

Comments

@keithbentrup
Copy link
Contributor

keithbentrup commented Nov 21, 2017

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

@magento-engcom-team magento-engcom-team added Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed 2.2.x Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release labels Nov 21, 2017
@Tjitse-E
Copy link
Contributor

Tjitse-E commented Dec 8, 2017

@magento-engcom-team is this issue already fixed on the development branche? If yes, can you point me to the right commit?

@okorshenko okorshenko removed the 2.2.x label Dec 14, 2017
@mslabko
Copy link
Member

mslabko commented Jan 19, 2018

Hi @Tjitse-E, fix will be available in the nearest release. For now you can take it from 2.2-develop branch: aaa60b1

@ishakhsuvarov
Copy link
Contributor

@mslabko @Tjitse-E @keithbentrup Closing this ticket for now as fix is available in 2.2.2 and delivered with the linked commit.
Thank you for collaboration.

magento-engcom-team pushed a commit that referenced this issue Mar 16, 2018
magento-engcom-team pushed a commit that referenced this issue Mar 16, 2018
Fixed issues:
- MAGETWO-85983: [Backport for 2.1.x] Admin login always takes >30 sec when using Redis on 2.2.1 #12385
@tuyennn
Copy link
Member

tuyennn commented Jan 10, 2019

#12362

@csdougliss
Copy link
Contributor

@tuyennn @magento-engcom-team @mslabko is this fixed in 2.3.1?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release
Projects
None yet
Development

No branches or pull requests

8 participants