ACP2E-5205: Large catalogs cause slow category loading and timeouts in Admin

The ACP2E-5205 patch fixes the issue where category loading takes a long time or caused a timeout issue when a large number of categories and products are involved. This patch is available when the Quality Patches Tool (QPT) 1.1.83 is installed. The patch ID is ACP2E-5205. 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.8-p3

Compatible with Adobe Commerce versions:

  • Adobe Commerce (all deployment methods) >= 2.4.8 < 2.4.9
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

Category loading takes a long time or caused a timeout issue when a large number of categories and products are involved.

Steps to reproduce:

  1. Create 2500 Categories and at least 10000 Products:

    1. Create a copy of setup/performance-toolkit, and put it to ./var to be able to edit profiles.
    2. Edit the small.xml profile, and set Categories = 2500 and Products = 250000.
    3. Run bin/magento setup:performance:generate-fixtures var/setup/performance-toolkit/profiles/ce/small.xml.
  2. After creating products and categories, ensure all of them are anchors, and run the query:

    code language-none
    UPDATE catalog_category_entity_int set value = 1 where attribute_id = (select attribute_id from eav_attribute where attribute_code = 'is_anchor');
    
  3. Go to the admin menu, ensure you have a deeper structure of categories, then move Category 2 deeper into the Category 1 tree.

  4. Reindex.

Expected results:

Every category opens from the first uncached try, and only takes a few seconds.

Actual results:

Category opening takes more than a minute.

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