Hi. I observed that Kratos does not comply to _`CO...
# talk-kratos
q
Hi. I observed that Kratos does not comply to _`COURIER_MESSAGE_RETRIES`_ value. I have a kratos container started with
--watch-courier
and 0 for the value of the beforementioned env. variable. When I create a verification flow, kratos sends out several emails to the same address instead of one, moreover it complains about being
Unable to set the message status to "sent". audience=application error=map[debug: message:Unable to locate the resource reason
. Here are the logs https://pastebin.com/1WNLsw6m. Pay attention to the email id - it's the same for the three attempts (instead of 1). And as the result I have 2 emails in my mailbox. If it's relevant I use Postmark as SMTP server and GMail as a mailbox for testing. In the
courier_messages
table I have
send_count
2 and
status
4 on the message with the id.
b
The
message state
is used to determine, whether to retry sending the message. Since it can’t be set to
sent
it will retry on the next iteration of the courier. Not easy to tell what’s going on here. It seems, that it can’t find the message in the table, which is weird because it obviously can (while sending it). What DB are you using?
q
Hi @bland-eye-99092, thank you for your response. I use MySQL in Google Cloud
b
Message was abandoned because it did not deliver after 2 attempts
these attempts are also just written to the DB row, so it makes no sense to me, that it can’t set the message status. Let me double check in the code.
Hmm, even after looking at the code, it doesn’t make sense, that it can increment the
send_count
, but can’t set the message status. Could you open an issue in ory/kratos and link to this conversation in there? Thanks! 🙂
q
Will do! Can the issue be related to the SMTP server I use?
Because throughout the testing I've never seen several messages being sent to @yandex.by mailbox, but with @gmail.com mailbox it happens often (but maybe it's just luck)
b
could have a host of reasons. But since the message arrives, I’d say the SMTP server seems to be working correctly. My guess would be more, that it is related to MySQL. We have had quirky behavior in the past here.
q
b
Thank you very much, we will take a look at it in more detail. 🙂
q
Thank you
124 Views