Make WordPress Core

Opened 3 years ago

#52527 new enhancement

Better RAM handling in wp-db.php

Reported by: dekadinious's profile Dekadinious Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 5.6.1
Component: Database Keywords:
Focuses: Cc:



I have to start by apologizing if I am in the wrong place, or if I am structuring this ticket badly. I don't have much experience here inside trac.

I stumbled upon a fatal error when trying to load the WooCommerce status page. The system runs out of memory on line 2022 in wp-db.php.

While the actual bug most certainly lies elsewhere, I got some hints from my host that the solution on line 2022 is not the best. I have no clue about this, but I thought I at least could submit a ticket and let the community decide!

To paraphrase a translation, they say:

wp-includes/wp-db.php line 2022 is a bad solution because of a database call that loads all results into RAM instead of iterating them one by one. But independent of this the error seems to be caused by a very large SQL-query that returns way too much data. Probably a bug somewhere.

This is not a ticket to handle the bug that returns way too much data, but it's a ticket to flag the possible issue of bad RAM handling in wp-db.php.

Change History (0)

Note: See TracTickets for help on using tickets.