Aws-sdk-js: How to configure maxRetries and retryDelays for SQS, S3, SES. What are there default values?

Created on 8 Sep 2015  路  3Comments  路  Source: aws/aws-sdk-js

We received Inaccessible host issue for SQS and S3 and as per recommendation in #528 we upgraded to latest sdk.
We are unable to find out the default values of maxRetries and the delay between retries. Just to be sure we wanted to know these numbers. Can anyone provide the information.

guidance

Most helpful comment

The default retry count for all service clients is 3. You can increase the default retry count by setting the maxRetries option when constructing a service client.

For example:

var s3 = new AWS.S3({maxRetries: 10});

The delay between retries is a calculated number and increases exponentially with the number of retries per this formula
delayn delay = 2n * 30 milliseconds

For example:

  • delay0 delay = 20 * 30 = 30 ms
  • delay1 delay = 21 * 30 = 60 ms
  • delay2 delay = 22 * 30 = 120 ms

Hope this helps clarify things.

All 3 comments

The default retry count for all service clients is 3. You can increase the default retry count by setting the maxRetries option when constructing a service client.

For example:

var s3 = new AWS.S3({maxRetries: 10});

The delay between retries is a calculated number and increases exponentially with the number of retries per this formula
delayn delay = 2n * 30 milliseconds

For example:

  • delay0 delay = 20 * 30 = 30 ms
  • delay1 delay = 21 * 30 = 60 ms
  • delay2 delay = 22 * 30 = 120 ms

Hope this helps clarify things.

Thank you @AdityaManohar for your detailed reply.

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.

Was this page helpful?
0 / 5 - 0 ratings