Problem/Motivation

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 524288 bytes) in .../www/web/core/lib/Drupal/Core/Database/Query/Condition.php on line 324
I worked around by reverting to version 4.4.4.

Steps to reproduce

I haven't yet been able to reproduce this with a new view. Will keep trying.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

hughworm created an issue. See original summary.

graber made their first commit to this issue’s fork.

graber’s picture

Version: 4.4.5 » 4.4.x-dev

graber’s picture

Status: Active » Needs review

Please test with the fix applied.

hughworm’s picture

Thanks @graber. I applied the change in 3591877-out-of-memory but still got the out of memory.

If it helps, I noticed that, even though I selected one node to process, the count query in Drupal\views\Plugin\views\query\Sql::execute() (line 1576) returned over 20,000, which makes $this->loadEntities($view->result) to cause the out of memory error.

graber’s picture

Priority: Normal » Major
Status: Needs review » Needs work

It should help a lot. I suspect there may be an OR condition group applied instead of AND somehow.
The strange thing though is that you’re the only one reporting the issue so far.

graber’s picture

Status: Needs work » Needs review

Ok, try this please.

graber’s picture

Since this is a major issue (I'd probably even make it critical if there was at least one more person reporting but looks like nobody uses a global OR condition making this a very edgy edge case) and the solution is a performance improvement, I'm going to merge it and release a fix now.

  • graber committed 513b374b on 4.4.x
    #3591877: Optimized VBO action processor getList().
    
graber’s picture

Status: Needs review » Fixed

Ok, maybe We'll wait just a bit before releasing.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

hughworm’s picture

I applied the patch to 4.4.5 and got error
"Exception: Unsupported query type: Drupal\views\Plugin\views\query\Sql in Drupal\views_bulk_operations\Service\ViewsBulkOperationsActionProcessor->populateQueue() (line 357 of modules/contrib/views_bulk_operations/src/Service/ViewsBulkOperationsActionProcessor.php)."

If I remove the instanceof check at line 356 the fix works.

Using php 8.2

hughworm’s picture

Adding
use Drupal\Core\Database\Query\SelectInterface;
to ViewsBulkOperationsActionProcessor.php fixed it.

graber’s picture

Status: Fixed » Needs work

Reopening, can you create a MR?

graber’s picture

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.