I am having almost 300 threads trying to access a single DynamoDB table with very low allocated read/write capacity (5/sec). So the load is clearly too high, and I am getting ProvisionedThroughputExceededException from DynamoDBMapper. The question is: how do I cause DynamoDBMapper to wait+retry rather than fail?
I am using ExponentialBackoffStrategy on AmazonDynamoDBClient with long delays (100ms base, 12 retries, so this yields: 100ms, 200ms, 400ms,... 409600ms), but it just doesn't work. In fact, it fails immediately. According to the docs:
ProvisionedThroughputExceededException
Message: You exceeded your maximum allowed provisioned throughput for a table or for one or more global secondary indexes. To view performance metrics for provisioned throughput vs. consumed throughput, open the Amazon CloudWatch console.
Example: Your request rate is too high. The AWS SDKs for DynamoDB automatically retry requests that receive this exception. Your request is eventually successful, unless your retry queue is too large to finish. Reduce the frequency of requests, using exponential backoff.
What am I doing wrong?
What does "too large to finish" mean?
Thanks!
In case you are wondering why I am using 300 threads, low allocated capacity and can accept long response times: normally we use higher capacities, I just don't want the application to fail if the capacity is low.