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 Magento Quality Patch (MQP) tool v.1.0.5 is installed.
Affected products and versions
Magento Commerce and Magento Commerce Cloud 2.3.4 - 2.3.5, 2.4.0Note: the patch can be applicable to other versions. To check if the patch is compatible with your Magento version, run
./vendor/bin/magento-patches status .
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%'
The status of
sales_clean_quotes cron job should be
success . Actual result:
The status of
sales_clean_quotes cron job is
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
For instructions on how to apply an MQP patch, use the following links depending on your Magento product:
- Magento Commerce: DevDocs Apply patches using Magento Quality Patches Tool .
- Magento Commerce Cloud: DevDocs Upgrades and Patches > Apply patches .
To learn more about Magento Quality Patches, refer to:
- KB Magento Quality Patches released: a new tool to self-serve quality patches .
- KB Check if patch is available for your Magento issue using Magento Quality Patches .
For info about other patches available in MQP tool, refer to the Patches available in MQP tool section.