Skip to content
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

Ability to specify alternative default retry for botocore max_attempts due to RequestLimitExceeded scenarios #5

Closed
tangerinedream opened this issue Sep 14, 2017 · 1 comment

Comments

@tangerinedream
Copy link
Owner

tangerinedream commented Sep 14, 2017

When boto hits a RateLimitExceeded, it uses exponential backoff. However, the issue can persist as the default retry attempt is set to 5. Using the code below, that default may be changed to any reasonable value, in this example 10.

This could be a configurable value in DynamoDB or hard coded (less desirable). If configurable, each Session have it's own value, although that is likely overengineering.

The code below appears to require boto/botocore version 1.6.0

Please refer to: boto/botocore#1260

from botocore.session import Session
from botocore.config import Config

s = Session()
# Will retry any method call at most 10 times
c = s.create_client('s3', config=Config(retries={'max_attempts': 10}))
@tangerinedream
Copy link
Owner Author

Addressed via e9b482a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant