-
-
Notifications
You must be signed in to change notification settings - Fork 964
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
Courier: Failing message stalls queue #1598
Comments
I assume the problem is here Lines 180 to 189 in 60d848d
as we do not expect the SMTP server to reject the message with a validation error. One issue will probably be that every SMTP server will be returning a different error message here, making it difficult to differentiate between:
I took a quick glance at the SMTP error codes: https://en.wikipedia.org/wiki/List_of_SMTP_server_return_codes It appears that 5xx errors should not be retried. So maybe adding a switch here that if it is a 5xx error, we set the status of the message to sent / failed, in which case it shouldn't be retried. What do you think? |
Yes your idea makes sense, this would definitely solve the retrying problem I'm experiencing. |
Nice, would you be up to make a PR for this? :) |
Sure, I don't have experience in Go, but I can try my hand at it! |
Actually duplicate of #402 |
Please tackle this! Our infrastructure was severely crippled for a few days as a nonexistent receiver email was stuck in the queue and no further emails were sent. |
@xeruf - this is an open source repository. The best thing you can do, if something bothers you, is to contribute the changes needed to get this working as you want. |
@aeneasr Sorry, but I disagree. I was witnessing this disruptive behaviour @xeruf described and only responding with "Please create a PR" is not really welcoming. The resonsability for fix severe bugs (which I consider this one is) lies in the maintainers and developers of the project, and it's stakeholders, not by the users who run into this. Sure, contributions are always welcome in open source projects but not as in "if you don't like this bug fix it" attitude. Feature requests are a different thing, for sure. |
Maintainers of popular open source projects like this one are burning out en masse while companies and users of those open source projects reap the benefits without either (a) putting money on the table or (b) contributing towards the health of the system. Just demanding "please fix this" is not an acceptable behaviour in open source communities. Please read up on this topic:
It would be great if the industry could become bit more sensitive to these topics. In any case, since this is now a priority for our mail sender, we'll tackle this - so we all get the best of all worlds ;) |
I am totally with you on that, and I hope our startup will soon be able to support the open-source projects it builds on, but currently we are unfortunately very sparse when it comes to both developer time and finances. |
Thank you for understanding, I appreciate the nice response :)) |
@aeneasr Thanks for fixing ! Is there any planned release which would ship this fix ? |
This PR replaces the `courier.message_ttl` configuration option with a `courier.message_retries` option to limit how often the sending of a message is retried before it is marked as `abandoned`. BREAKING CHANGES: This is a breaking change, as it removes the `courier.message_ttl` config key and replaces it with a counter `courier.message_retries`. Closes ory#402 Closes ory#1598
Describe the bug
When an outgoing message fails to send, the message queue is stalled.
For example, if AWS SES replies with error
554 Message rejected: Email address is not verified
, the oldest message in the queue will be retried forever. Newer messages in the queue are not processed.A user could also stall the queue by submitting an invalid email address (e.g.
me@notld
).Reproducing the bug
Steps to reproduce the behavior:
Using the Selfservice UI Node project, setup the courier config (I tried using AWS SES), and try recovering a password using an unverified email address
email1@domain.com
. This should cause the courier to fail:Try recovering another email address (
email2@domain.com
). You will see in the logs that the previous email address (email1@domain.com
) keeps being repeated in the logs, without mention of the new address (email2@domain.com
).This indicates that the courier queue keeps retrying sending to
email1@domain.com
without regard foremail2@domain.com
.Expected behavior
The courier queue should not stall when a particular message fails to send. Other messages in the queue should be processed, even if a given message fails.
Environment
Additional context
N/A
The text was updated successfully, but these errors were encountered: