ACP2E-4695: Catalog rule indexer out-of-memory failures caused by excessive memory usage

The ACP2E-4695 patch fixes the issue where the catalog rule indexer consumes excessive memory and fails to complete, causing instability and out-of-memory errors. This patch is available when the Quality Patches Tool (QPT) 1.1.82 is installed. The patch ID is ACP2E-4695. Please note that this issue is scheduled to be fixed in Adobe Commerce 2.4.9.

Affected products and versions

The patch is created for Adobe Commerce version:

  • Adobe Commerce (all deployment methods) 2.4.7-p9

Compatible with Adobe Commerce versions:

  • Adobe Commerce (all deployment methods) 2.4.7 - 2.4.7-p10
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

Catalog rule indexer consumes excessive memory and fails to complete, causing instability and out-of-memory errors.

Prerequisites:

A large catalog containing approximately 500,000 products and 10 product attributes. These values are approximate and indicate the order of magnitude needed to reproduce the issue, not exact thresholds.

Steps to reproduce:

  1. On the Admin sidebar, go to Stores > Attributes > Product. Edit each test attribute, set Scope to Website, and under Storefront Properties, set Use for Promo Rule Conditions to Yes.
  2. On the Admin sidebar, go to Marketing > Promotions > Catalog Price Rules and click Add New Rule.
  3. Create a catalog price rule that uses all of these attributes in the Conditions section.
  4. Set the PHP memory limit to 1 GB.
  5. Run bin/magento indexer:reindex catalogrule_rule.

Expected results:

The catalog rule indexer completes successfully.

Actual results:

The catalog rule indexer fails with an out-of-memory error.

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:

recommendation-more-help
commerce-operations-help-tools