[PaaS only]{class="badge informative" title="Applies to Adobe Commerce on Cloud projects (Adobe-managed PaaS infrastructure) and on-premises projects only."}

ACSD-66153: Page returns 500 error due to cached incorrect layout structure

The ACSD-66153 patch fixes the issue where a page returns a 500 error code due to a cached incorrect layout structure. This patch is available when the Quality Patches Tool (QPT) 1.1.69 is installed. The patch ID is ACSD-66153. 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.5-p10

Compatible with Adobe Commerce versions:

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

A page returns a 500 error because of a cached incorrect layout structure.

Steps to reproduce:

  1. Install 2.4-develop.

  2. Create and install custom module:
    1.1 Add a custom block to the catalog_category_view layout.
    1.1 Inject Magento\Framework\View\Result\Layout into the custom block through its constructor.

  3. Create the category shop.

  4. Open two terminal windows:

    1. Terminal 1: Continuously clean the layout cache:

      code language-shell
      for i in {1..200}; do
        bin/magento cache:clean layout
      done
      
    2. Terminal 2: Simulate concurrent requests to the category page:

      code language-shell
      for i in {1..200}; do
        curl -s -o /dev/null -w "Request $i: HTTP %{http_code}\n""http://your_magento_base_url/shop.html?req=$i"
      done
      
  5. Some requests randomly fail with a 500 status code, and the var/log/support_report.log shows the following error:

    code language-yaml
    report.CRITICAL: The element with the "root" ID wasn't found. Verify the ID and try again. [] []
    

Expected results:

All requests return 200 OK.

Actual results:

Some requests intermittently return 500 Internal Server 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
c2d96e17-5179-455c-ad3a-e1697bb4e8c3