The problem seems to come from ScriptoJob::getProjectItemIds() and ScriptoJob::getProjectMediaIds() when fetching the results using $query->getResult(). Since the queries are returning all rows, Doctrine's processing needs plus the resulting data structures can require enough memory to reach PHP's limit. We need to find a way to reduce memory usage. Things to try:
~Use getScalarResult() instead of getResult()~ Note: While it does marginally reduce memory usage, getScalarResult() does not have a great enough effect to solve the problem;
Execute the queries in DBAL using $conn->prepare() (see example diff below).
The problem seems to come from
ScriptoJob::getProjectItemIds()
andScriptoJob::getProjectMediaIds()
when fetching the results using$query->getResult()
. Since the queries are returning all rows, Doctrine's processing needs plus the resulting data structures can require enough memory to reach PHP's limit. We need to find a way to reduce memory usage. Things to try:getScalarResult()
instead ofgetResult()
~ Note: While it does marginally reduce memory usage,getScalarResult()
does not have a great enough effect to solve the problem;$conn->prepare()
(see example diff below).