You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In #37712 the the MessageLoggerListener was moved to only be in the mailer_debug.php file which fixes memory leaking issues. But in 6214f3a this change sems to be reverted and i'm not sure why.
If you run these steps and then debug MessageLoggerListener you can see thet it stores all the e-mail items in a array leaking them in memory. If you have attachment items then it leaks super fast.
It has been moved back in #42771, saying it was done to match the 5.1 and 5.3 configuration. This ignored the fact that the change was done intentionally in 5.2 and not by mistake.
Apparently, it was done to solve an issue. But this might indicate that it was not the right way to fix the issue.
Does anybody know what the correct sollution would be here. I can supply a PR if needed but i'm not sure if moving it back to mailer_debug.php is what the correct solution is here.
Symfony version(s) affected
5.4.24
Description
In #37712 the the
MessageLoggerListener
was moved to only be in themailer_debug.php
file which fixes memory leaking issues. But in 6214f3a this change sems to be reverted and i'm not sure why.Other reference #45211
How to reproduce
cd memory-leak
config/packages/messenger.yaml
.env
src/Command/SendBatchEmailCommand.php
If you run these steps and then debug
MessageLoggerListener
you can see thet it stores all the e-mail items in a array leaking them in memory. If you have attachment items then it leaks super fast.I have pushed my example to a repo here https://github.com/cmodijk/MemoryLeak
Possible Solution
I think the linked PR already fixed the issue before and it should be moved again.
Additional Context
No response
The text was updated successfully, but these errors were encountered: