mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
Memory-Leak? #7473
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 @fungus75 on GitHub (Feb 8, 2025).
Bug Report
Summary
After importing a huge amount of data into the database we call for any entry within a entity a function that updates some fields. So the function is very simple (developed as symfony console command) but it looks like doctrine is loosing some memory. Because at around 10'000 iterations we got an Out-Of-Memory-Error from php.
Current behavior
Looks like Memory was lost, because we got an out-of-memory-error:
Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in /var/www/app/vendor/doctrine/persistence/src/Persistence/Reflection/RuntimeReflectionProperty.php on line 46
Expected behavior
Memory should not be lost.
How to reproduce
this is the function:
the updateSimpleSearch in that case looks like:
$this->_q = $this->positionstext;@greg0ire commented on GitHub (Feb 8, 2025):
First, I'd like to point out that you don't seem to be doing a lot of interesting stuff with
$batch_pos. Also, this feels like a support question more than a bug report, despite its label, so let me convert it. And finally, maybe this will help: https://www.doctrine-project.org/projects/doctrine-orm/en/3.3/reference/batch-processing.html