MDVA-30102: Redis cache getting full

The MDVA-30102 patch solves the issue of the Redis cache getting full and generating errors, causing problems with Product Listing Pages (PLP) and Product Detail Pages (PDP), such as missing products. This patch is available when the Quality Patches Tool (QPT) 1.0.6 is installed.

Affected products and versions

The patch is created for Adobe Commerce version:

  • Adobe Commerce on cloud infrastructure 2.3.5-p1

Compatible with Adobe Commerce versions:

  • Adobe Commerce (all deployment methods) 2.3.2 - 2.4.1-p1
NOTE
The patch might become applicable to other versions with new Quality Patches Tool releases. To check if the patch is compatible with your Adobe Commerce version, update the magento/quality-patches package to the latest version and check the compatibility on the Quality Patches Tool: Search for patches page. Use the patch ID as a search keyword to locate the patch.

Issue

Redis cache is getting full, and the allocated maxmemory appears to be insufficient. The layout cache didn’t have TTL and was not evicted, causing cache growth and eviction of other keys in Redis. As a result, all Redis memory was allocated for layout cache.

Prerequisites:

Steps to reproduce:

  1. Browse through all the PDPs and PLPs. You can use OWASP ZAP to crawl the site.
  2. Observe the Redis memory usage.
  3. Also, check current configuration and used memory. Run the following command in the CLI. It checks for used memory, maxmemory, evicted keys, and Redis up time in days:
redis-cli -p REDIS_PORT -h REDIS_HOST info | egrep --color "(role|used_memory_peak|maxmemory|evicted_keys|uptime_in_days)"

Expected results:

Redis cache should not be rapidly growing.

Actual results:

Redis cache grows up to ~5GB. There is a max limit of 8GB of Redis memory, so if you have 1M products, you will run out of memory very quickly.

Apply the patch

To apply individual patches, use the following links depending on your deployment method:

To learn more about Quality Patches Tool, refer to:

For info about other patches available in QPT, refer to Patches available in QPT in our developer documentation.

recommendation-more-help
8bd06ef0-b3d5-4137-b74e-d7b00485808a