3

I doubt if it's true or my understanding is not correct of this statement in DynamoDB. It says,

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 Error Retries and Exponential Backoff.

Q1: Is it retrying on its own when the exception occurs? Im just afraid maybe the data will not be inserted.

Please help me. :D Thanks in advance!

NoSQLKnowHow
  • 4,449
  • 23
  • 35
Jay Hyber
  • 321
  • 1
  • 4
  • 18
  • https://stackoverflow.com/questions/48022398/what-should-be-done-when-the-provisioned-throughput-is-exceeded/48025081#48025081 – F_SO_K Sep 04 '18 at 08:56

1 Answers1

4

Yes the SDK will retry automatically, but the key thing to know is that by the time the app sees the provisioned throughput exceeded exception, the default max retries have already been exceeded. If you get that exception, your app needs to handle it and optionally attempt the operation again. Also, know that exponential backoffs may not be the fastest way to get your operations to DynamoDB, so depending on your use case, and if ultimate speed is critical to your app, it might be better to disable retries and write your own retry strategy.

NoSQLKnowHow
  • 4,449
  • 23
  • 35
  • how long will it usually take before I can actually update the records in my database, after seeing this message ? – bvdb Aug 21 '19 at 22:12
  • @bvdb there is no exact timing. It depends on a few variables, such as what your capacity is set to if in provisioned mode, do you have auto-scaling turned on, how large is your database, etc. DynamoDB recently added the ability to monitor when you are getting close to your table limits. If you did this and could trigger increases, that would be how I'd solve it. That or depending on your use case, switch to on-demand capacity mode. – NoSQLKnowHow Aug 21 '19 at 22:55
  • that's where I am a bit confused. My table and index seem to be in "on-demand" capacity. - (ps: in mean time it has completed, but I just don't understand why on-demand can still be so slow. Since it's on-demand, I would expect amazon would automatically scale to the required resources and give me the resources I need straightaway, because it's set to on-demand. Are you saying that on-demand is actually slower than provisioned? I guess I got it all wrong about this.) – bvdb Aug 22 '19 at 10:31
  • 1
    @bvdb No, not slower. There are other reasons you could be getting throttled when it on-demand mode. Yes DynamoDB does add capacity automatically on your behalf, but that can take time, just as if you were in provisioned mode. Capacity added meaning partitions created in that table. There are other reasons you can get throttling errors too just fewer than when it provisioned mode, but without knowing more about your situation and the metrics, it is really difficult to help you directly. Have you contacted AWS support yet? – NoSQLKnowHow Aug 22 '19 at 16:03