Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.6k
Fix memory leak, issue 50486#59239
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
carsonbot commentedDec 17, 2024
Hey! I see that this is your first PR. That is great! Welcome! Symfony has acontribution guide which I suggest you to read. In short:
Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change. When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor! I am going to sit back now and wait for the reviews. Cheers! Carsonbot |
carsonbot commentedDec 17, 2024
Hey! Oh no, it looks like you have made this PR towards a branch that is not maintained anymore. :/ Cheers! Carsonbot |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Can you provide some metrics about the memory leak itself? A measurement before the fix and after would be helpful.
@@ -73,7 +73,6 @@ public function getValidTimezones(): iterable | |||
yield ['EST5EDT']; | |||
yield ['MST7MDT']; | |||
yield ['PST8PDT']; | |||
yield ['America/Montreal']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
This does not seem to be related to the problem described in the issue. Can you revert this change?
@@ -1043,6 +1043,7 @@ public function testSubmitNullUsesDateEmptyData($widget, $emptyData, $expectedDa | |||
$form = $this->factory->create(static::TESTED_TYPE, null, [ | |||
'widget' => $widget, | |||
'empty_data' => $emptyData, | |||
'years' => range(2018, (int) date('Y')), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
This does not seem to be related to the problem described in the issue. Can you revert this change?
@@ -708,6 +708,7 @@ public function testSubmitNullUsesDateEmptyData($widget, $emptyData, $expectedDa | |||
$form = $this->factory->create(static::TESTED_TYPE, null, [ | |||
'widget' => $widget, | |||
'empty_data' => $emptyData, | |||
'years' => range(2018, (int) date('Y')), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
This does not seem to be related to the problem described in the issue. Can you revert this change?
This PR was merged into the 6.4 branch.Discussion----------[Mailer] Fix Sendmail memory leak| Q | A| ------------- | ---| Branch? | 6.4 <!-- see below -->| Bug fix? | yes| New feature? | no <!-- please update src/**/CHANGELOG.md files -->| Deprecations? |no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->| Issues |Fix#50486 <!-- prefix each issue number with "Fix #", no need to create an issue if none exists, explain below instead -->| License | MITPrevious PR:#59239Fixes issue#50486 (Sendmail transport runs out of memory).- I have removed unrelated changes that somehow got in the previous attempt of pull request because of wrong base version.- As for the "metrics about the memory leak itself" - it is in the issue 50486. When write(), which is defined in vendor/symfony/mailer/Transport/Smtp/Stream/AbstractStream.php, is called without $debug parameter, it's true by default, and $this->debug gets appended all the email body data incrementally. So for example if you have loop sending personalized emails to 200,000 subscribers 20 kB each, $this->debug becomes 4 GB, plus overhead, and the script runs out of resources. The fix eliminates the problem.<!--Replace this notice by a description of your feature/bugfix.This will help reviewers and should be a good start for the documentation.Additionally (seehttps://symfony.com/releases): - Always add tests and ensure they pass. - Bug fixes must be submitted against the lowest maintained branch where they apply (lowest branches are regularly merged to upper ones so they get the fixes too). - Features and deprecations must be submitted against the latest branch. - For new features, provide some code snippets to help understand usage. - Changelog entry should followhttps://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry - Never break backward compatibility (seehttps://symfony.com/bc).-->Commits-------c74e2a3 fix_50486 - memory leak
Uh oh!
There was an error while loading.Please reload this page.