Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Closed
rch7 wants to merge0 commits intosymfony:6.4fromrch7:fix_50486
Closed

Fix memory leak, issue 50486#59239

rch7 wants to merge0 commits intosymfony:6.4fromrch7:fix_50486

Conversation

rch7
Copy link
Contributor

@rch7rch7 commentedDec 17, 2024
edited
Loading

QA
Branch?6.4
Bug fix?yes
New feature?no
Deprecations?no
IssuesFix 50486
LicenseMIT

@carsonbot
Copy link

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:

  • Always add tests
  • Keep backward compatibility (seehttps://symfony.com/bc).
  • Bug fixes must be submitted against the lowest maintained branch where they apply (seehttps://symfony.com/releases)
  • Features and deprecations must be submitted against the 7.3 branch.

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!
If this PR is merged in a lower version branch, it will be merged up to all maintained branches within a few days.

I am going to sit back now and wait for the reviews.

Cheers!

Carsonbot

@carsonbot
Copy link

Hey!

Oh no, it looks like you have made this PR towards a branch that is not maintained anymore. :/
Could you update thePR base branch to target one of these branches instead? 6.4, 7.1, 7.2, 7.3.

Cheers!

Carsonbot

@rch7rch7 changed the base branch from4.4 to6.4December 17, 2024 17:56
Copy link
Member

@welcoMatticwelcoMattic left a 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'];
Copy link
Member

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')),
Copy link
Member

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')),
Copy link
Member

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?

@rch7rch7 marked this pull request as draftDecember 18, 2024 01:14
@rch7rch7 closed thisDec 18, 2024
@rch7rch7 deleted the fix_50486 branchDecember 18, 2024 15:22
nicolas-grekas added a commit that referenced this pull requestJan 7, 2025
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
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@welcoMatticwelcoMatticwelcoMattic requested changes

@xabbuhxabbuhAwaiting requested review from xabbuh

@ycerutoycerutoAwaiting requested review from yceruto

Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@rch7@carsonbot@welcoMattic

[8]ページ先頭

©2009-2025 Movatter.jp