-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Mailer] SMTP transport fails for long running processes #36301
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
@tomme87 you could use this setter to customize the value? https://github.com/symfony/symfony/pull/35633/files#diff-1e389e0e3302b8f3db89160f092bd39dR86 |
@dmaicher Yes, that requires me to create my own factory and set that value tho. I don't think I should be required to deal with that value.. I just want to send an email. At the very least the error message should be better and maybe point me to that value. And if this is a value that needs to be changed based on what SMTP server I use it should be configuration option imo. |
I had the same problem, I'm also using amazon SES with smtp transport, I fixed overriding the smtp factory to adjust $pingThreshold, but I would like to find a more elegant solution. |
Maybe it should be an option on the Like |
This parameters was introduced in #35633 |
Currently the transport throw TransportException until $pingThreshold is exceded, if the $pingThreshold is faster, the number of retries to reconnect to the transport increase, but the problem persists, in long-running processes a lot of messages will be discarded in 10 seconds. @tomme87 Are you using messenger worker to send messages ? |
I am still seeing this problem on our system. It doesn't seem that the merged PR resolves the problem. |
@arjanfrans please open an new issue with details |
Symfony version(s) affected: 5.0.5+
Description
Happens if sending a email, and after 10 seconds (and before 100 seconds) a new email (on the same connection) is sent, then a
TransportException
is thrown:If sending another email an other
TransportException
is thrown:This happens until I wait for 100 seconds.
How to reproduce
Use symfony/messenger, run
message:consume
and send a Email, wait for between 10 and 100 seconds then send a new Email.I have only been able to reproduce this using Amazon SMTP server, but it might be others too.
Possible Solution
setting
$pingThreshold
inSmtpTransport
to10
seams to solve the issue.Additional context
Looks like it happens after #35633 was introduced.
The text was updated successfully, but these errors were encountered: