Skip to content

[Issue] Clean expired quotes - Fix out of memory on huge quotes list #28342

Closed
@ghost

Description

This issue is automatically created based on existing pull request: #27260: Clean expired quotes - Fix out of memory on huge quotes list


Description (*)

On production we had a lot of expired quotes, and during cron run we were getting fatal error:

PHP Fatal error:  Allowed memory size of 2147483648 bytes exhausted (tried to allocate 20480 bytes) in /path/to/magento2/vendor/magento/framework/Model/AbstractModel.php on line 359

Check https://getcomposer.org/doc/articles/troubleshooting.md#memory-limit-errors for more info on how to handle out of memory errors.

Investigation found that cron job sales_clean_quotes fails with out of memory because it tries to load all quote items at once

Related Pull Requests

N/A

Fixed Issues (if relevant)

N/A

Manual testing scenarios (*)

  1. ...
  2. ...

Questions or comments

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds are green)

Metadata

Metadata

Assignees

Labels

Component: SalesFixed in 2.4.xThe issue has been fixed in 2.4-develop branchIssue: Format is not validGate 1 Failed. Automatic verification of issue format is failedPriority: P3May be fixed according to the position in the backlog.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchSeverity: S2Major restrictions or short-term circumventions are required until a fix is available.Triage: DoneHas been reviewed and prioritized during Triage with Product Managers

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions