Closed jfcalvo closed 2 years ago
👋 Thx for filing the issue! In order for us to retry, we 1. need a response and 2. need it needs to be of the following -
Do you happen to know which one of these is being hit?
Also, I would have expected our use of idempotency_keys
would prevent this type of issue. Do you have a log of the headers from those requests?
Another question would be is if you have recv_timeout
configured? That might be a source of an issue here?
config :stripity_stripe, hackney_opts: [{:connect_timeout, 1000}, {:recv_timeout, 5000}]
There are two notable discussion points.
Idempotency-Key
and if we generated a different one. Any retry should use the same key - our logic only adds the idempotency key once and retries with the same
I think there is a problem with retries and requests that perform destructive actions like delete a subscription.
In my case I'm trying to delete a subscription and I'm getting an 404 error with
resource_missing
. These are the logs for the subscription at Stripe:I think the library is doing the first request that is taking more time than expected, then retrying again (twice) but the first request already deleted the subscription so the two last request are returning an error and finally returning the error of the last request.
The retrying policy should not be a problem with idempotent request but for requests like delete it's a source of possible problems.
What should be the correct solution for this? Disable retries? Increase
base_backoff
ormax_backoff
?I'm using
stripy_stripe
2.12.1
.