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
[Mailer] Expected response code "250" but got code "451" #45586
Comments
We got a response back from our email supplier and their explanation is that the AWS service will close any connections that are idle for more than 10 seconds. Reference from AWS: So according to them, it's one of the following: |
Maybe you need to experiment with the ping threshold configuration of the SmtpTransport. |
@dmaicher Thanks for your response. This is what we ended up doing. So for those of you who would come across the same issue: |
This error message indicates that the mail server was expecting a response code of 250 from the client, but instead received a response code of 451 with the message "Timeout waiting for data from client." This means that the client took too long to send data to the server and the server timed out waiting for the data. There could be several reasons for this issue, including network connectivity problems, server overload, or a malfunctioning client. To troubleshoot this issue, you can try the following steps: Check the network connectivity between the client and server to ensure that there are no network issues causing the timeout. Verify that the server is not overloaded with requests and that there is enough processing power and memory available to handle incoming requests. Check the client configuration to ensure that it is sending data correctly and is not malfunctioning in any way. If the issue persists, you may want to contact your email service provider for further assistance in resolving the problem. |
Thanks for the information, it really put some light on as to what caused the problem there. Thanks again!! |
Thanks ChatGPT |
It not working for me |
I get the same issue but ping_threshold does not work for me |
@amanpatel123 @jackbaron it might be related to the attachments you're adding to the email being too large. This was the issue in my case.
|
Please use one of the community support channels (https://symfony.com/support) to get help. We use the issue tracker solely for reporting/discussing bugs and new features. |
Symfony version(s) affected
6.0.3
Description
We've upgraded our application to Laravel 9 last week and noticed a large amount of failed jobs appearing as soon as we deployed the build in production.
Those errors were all email related with the following error message:
Expected response code "250" but got code "451", with message "451 4.4.2 Timeout waiting for data from client.".
We've reverted back to the previous build (which was using SwiftMailer) and the errors stopped. To clarify, we've been running the application for a few weeks and never had that error before.
How to reproduce
The only way I was able to reproduce the error is by spamming the notifications to the point were we would eventually start getting the failed jobs with the exception again.
The error seems to occur when there's a fairly large amount of jobs being dispatched at the same time.
Possible Solution
No response
Additional Context
The notifications are dispatched to a third party server provider (which to my understanding is running on AWS).
I've seen an issue posted a few years ago which seem to be describing the exact same issue.
The text was updated successfully, but these errors were encountered: