Loading multiple entity revisions together causes memory exhaustion

Created on 15 February 2021, about 4 years ago
Updated 2 August 2024, 8 months ago

Problem/Motivation

I receive the following error when there are multiple items in queue to remove composite revisions that are no longer used.

PHP Fatal error: Allowed memory size of ********* bytes exhausted

Steps to reproduce

When there are multiple items in queue to remove composite revisions run "drush cron"

Proposed resolution

In /entity_reference_revisions/src/Plugin/QueueWorker/OrphanPurger.php instead of loading multiple revisions together, iterate over $entity_revision_ids array and load entity revision one by one inside foreach loop.

🐛 Bug report
Status

Needs work

Version

1.0

Component

Code

Created by

🇮🇳India Shashwat Purav Mumbai

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024