Issue: logging in to Magento Admin or opening the checkout page causes lag or timeout (over 30 seconds). The issue occurs when Redis is used for session storage.
Cause: Github issue #12385.
Solution: update to the latest Magento patch to fix these issues for all versions of Redis and specific versions of Magento Commerce.
Affected versions and technologies
- Magento Commerce / Magento Commerce Cloud 2.1.11-2.1.13
- Magento Commerce / Magento Commerce (Cloud) 2.2.1
- Redis, all versions
If you use Magento Commerce (Cloud) 2.2.0, a workaround is available.
Logging in to Magento Admin or proceeding to the checkout page takes over 30 seconds.
This only occurs when user sessions are stored in Redis.
Magento had an issue with the session locking mechanism that added a 30-seconds timeout to some operations when Redis was used for session storage. For details, see the Github issue #12385.
This issue has been fixed in Magento 2.1.14 and 2.2.2 (see Release Notes).
Solutions: patch or upgrade
Solution 1: Apply the patch with a fix
To receive a patch, submit a support ticket requesting the patch. In your ticket, specify your Magento version and the corresponding reference number for the patch:
- 2.1.11 and later: MDVA-7835
- 2.2.1: MDVA-8128
The general (version-agnostic) reference number is MAGETWO-84289.
Solution 2: Upgrade to 2.1.14/2.2.2 or later
If you have previously considered upgrading to Magento 2.2.2 or later, you may use this update opportunity to fix the issue.
Workaround: disable session locking
To disable session locking, set
1 in the Redis configuration section of the
'session' => array ( 'save' => 'redis', 'redis' => array ( 'host' => 'redis.internal', 'port' => 6379, 'database' => '0', 'disable_locking' => '1' ), ),
This solution does not affect any other Magento functionality.
Revert workaround after applying the patch
After applying the patch with the fix, the workaround is not required anymore, so you may revert it (set
Magento (Cloud) 2.2.0: use ECE-Tools v2002.0.8 or later
The ECE-Tools deployment script package with versions 2002.0.3-2002.0.7 applies the workaround automatically, setting
1. This disables the session locking mechanism for Magento 2.2.0, on which the original issue does not occur.
If you are running Magento Commerce (Cloud) 2.2.0, upgrade ECE-Tools to v2002.0.8 of later. You may also consider upgrading your Magento Commerce (Cloud) to 2.2.2 or later.