Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DynamoDB: handling throttling with boto

According to DynamoDB docs, requests causing database throttling are automatically retried if using the supported SDKs. However, I was unable to find any mention about how boto handles throttling cases. Does boto automatically retry throttled requests or should I start catching ProvisionedThroughputExceededException?

like image 480
user1597701 Avatar asked Sep 18 '25 09:09

user1597701


1 Answers

Boto does automatically retry ProvisionedThroughputExceededException errors. There is a special retry handler in the boto.dynamodb.layer1 module that handles this. It uses shorter wait intervals and retries a maximum of 10 times. After that, it throws a DynamoDBThroughputExceededError exception. The boto library also keeps track of the total number of ThroughputExceededErrors that are caught in the attribute throughput_exceeded_events of the Layer1 object.

like image 175
garnaat Avatar answered Sep 21 '25 21:09

garnaat