MDVA-28409 patch: Adobe Commerce web server crashing - Out of memory

The MDVA-28409 patch solves the issue where the cron job for removing quotes stopped due to having to process a large number of items. This patch is available when the Quality Patches Tool (QPT) v.1.0.5 is installed.

Affected products and versions

Adobe Commerce on-premises and Adobe Commerce on cloud infrastructure 2.3.4 - 2.3.5, 2.4.0

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

The issue is that the cron job has run out of memory due to the amount of data that the job is trying to process. Symptoms of this issue include slow performance due to high disk usage by MySQL and low web server memory.

Steps to reproduce:

To check if there is a cron job that is not able to remove outdated quotes run the following query:

select * from cron_schedule where job_code like '%sales_clean_quotes%'

Expected result:

The status of sales_clean_quotes cron job should be success.

Actual result:

The status of sales_clean_quotes cron job is running or error.

Another way to confirm that there is a cron job that is not able to remove outdated quotes is to map the output from the query from Step 1 (executed_at) against the timestamps of any memory errors in /var/log/cron.log. If there is a cron job that is not able to process the amount of data you may see a message similar to:

PHP Fatal error:  Allowed memory size of 1073741824 bytes exhausted (tried to allocate 4096 bytes) in /app/vendor/magento/framework/DB/Statement/Pdo/Mysql.php on line 91

Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 4096 bytes) in /app/vendor/magento/framework/DB/Statement/Pdo/Mysql.php on line 91
--
[2020-05-30 05:00:27.224718] Launching command 'php bin/magento cron:run'.

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 the Patches available in QPT section.

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