mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
Possible mem leak in Query::getSingleScalarResult #6200
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @flaushi on GitHub (Mar 20, 2019).
Originally assigned to: @lcobucci on GitHub.
Bug Report
My DQL query selects a number from an entity:
This query is executed tens of thousands of times inside a Symfony console application.
Now if I use
getSingleScalarResultthe memory consumption will explode.However, switching to
getResulthelps:In the latter case, memory consumption stays bearable.
I found this issue and developed a TestCase.
Unfortunately the test case does not produce the memory leak.
However, when repeating the queries, memory consumption does increase. This should not be the case IMHO?
gives
One has to say that I had to switch to PHP 7.2 for the test case to compile and also pulled orm from master branch. My software uses PHP 7.1 and ORM 2.6.2