-
Notifications
You must be signed in to change notification settings - Fork 769
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
maxNetworkRetries setting does not work #1058
Comments
Hello @rilian, I think stripe node works as you expect with respect to request timeouts but not socket timeouts. Presently the timeout applies only to a request after a connection has been successfully established. Under the hood we set req.setTimeout and use the value passed into the timeout in the config object. It can also happen that your host OS can not successfully establish a connection in the first place and the timeout here is the socket timeout that is specified by your operating system. Can you give us more details around the error happening where it's printing 'Could not pay Invoice Request aborted due to timeout being reached`? Thank you! |
hi @ctrudeau-stripe do you have any updates regarding fixing this issue ? we got it again, in a slightly different scenario in new case, our lambda service was only requesting
and Lambda execution duration was definitely less than time of 2 retries - it ended after 10 sec meaning there was NO retry at all
i would like to add that this is a test stripe key, and we did many requests in a loop in parallel, but in any case, even if request was rate limited it had to receive a 429 HTTP status instead of timeout that was not retried the exception that we got is
|
Hello @rilian, are you able to verify you were able to establish a socket? If it was not able to establish a socket the maxNetworkRetries parameter will not work. I'm wondering from your stack trace if the socket was able to establish or not. |
@ctrudeau-stripe how would you recommend verifying that ? other 1000s requests today were fine (did not timeout in 10sec).. |
@ctrudeau-stripe please review ^^ |
@rilian Sorry for the delays! I tagged internally and we'll review this after the holidays! |
@ctrudeau-stripe thank you, i'll subscribe to that PR and will watch for release |
hi @ctrudeau-stripe . i watched for stripe-node releases and this was not merged in last 2 releases. Can you please clarify what you mean by "next major version". Do you plan to fix it in v9 ? ... thank you! It's very important fix for stability of payments for all customers |
@richardm-stripe fantastic, thank you! |
@richardm-stripe using request timed out after 10 sec, with this configuration:
and was not retried. with configuration above we expected it to be retried at least 2 times timing report from Lambda:
|
environment: node v10.x on AWS Lambda
package version
"stripe": "^8.84.0"
we have the following code in our checkout lambda function, as suggested in official docs https://www.npmjs.com/package/stripe#network-retries
in one of executions it thrown exception
we expected request would be retried at least 3 times, but it did not, cause Lambda function duration was ~5000ms
The text was updated successfully, but these errors were encountered: