-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Mailer] Memory leaking when sending many emails #50580
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
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. |
@stof Tnx for referencing the PR that moved it back. I'm wondering what the correct solution for it should be in the end. |
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 |
So what should be the next step? I am also curious. |
Friendly ping to @nicolas-grekas, @derrabus, @lyrixx (because you all approved GitHub pull request #42771). How can we solve this issue? We would like to receive input so that we can work on this. 👍 |
It was probably not a good idea to to not disable the For the |
@xabbuh So you would propose a solution where we would only enable the |
Hey, thanks for your report! |
@carsonbot this GitHub issue is still relevant and has not yet been resolved. |
FYI : I just got hit by this bug. in my case it was leaking ~100KB per mail which was... not good. I worked around it by instantiating the |
The idea in #50580 (comment) (registering the listener only when the collector services are registered) looks like a good idea. Anyone willing to implement it ? |
Note that for the dev environment, something like #60243 should be implemented as well. |
…ebug mode to prevent memory leaks
…ebug mode to prevent memory leaks
…hen profiler enabled to prevent memory leaks
Uh oh!
There was an error while loading. Please reload this page.
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
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: