English 中文(简体)
如何解决死因的截断错误?
原标题:How to solve throughput error for dynamodb?

追溯(最后一项来自青the的产出):

File "batchpy.py", line 61, in <module>
obj.batch_w1()
File "batchpy.py", line 49, in batch_w1
batch.put_item(data=item)
File "/usr/local/lib/python2.7/dist-packages/boto/dynamodb2/table.py",   line 1641, in __exit__
self.resend_unprocessed()
File "/usr/local/lib/python2.7/dist-packages/boto/dynamodb2/table.py", line 1718, in resend_unprocessed
resp = self.table.connection.batch_write_item(batch_data)
File "/usr/local/lib/python2.7/dist-packages/boto/dynamodb2/layer1.py", line 420, in batch_write_item
body=json.dumps(params))
File "/usr/local/lib/python2.7/dist-packages/boto/dynamodb2/layer1.py", line 2842, in make_request
retry_handler=self._retry_handler)
File "/usr/local/lib/python2.7/dist-packages/boto/connection.py", line 954, in _mexe
status = retry_handler(response, i, next_sleep)
File "/usr/local/lib/python2.7/dist-packages/boto/dynamodb2/layer1.py", line 2876, in _retry_handler
response.status, response.reason, data)
boto.dynamodb2.exceptions.ProvisionedThroughputExceededException:    ProvisionedThroughputExceededException: 400 Bad Request
{u message : u The level of configured provisioned throughput for the table was exceeded. Consider increasing your provisioning level with the UpdateTable API , u __type : u com.amazonaws.dynamodb.v20120810#ProvisionedThroughputExceededException }
最佳回答

解决这一问题的途径很少:

  1. 提高产出水平(为此,你必须支付更多费用)。

  2. 在申请一级执行。 例如,叫DynamoDB检查例外。 如果超额投入,就睡了几秒钟,再次打上同样的问候(这是我们所言的。)

Edit:

  1. DynamoDB has added one more feature for On-Demand capacity. In this, we don t have to define any specific capacity for our table as DynamodB itself will perform auto-scaling for us.
问题回答

DynamoDB对文字和文字都采用了一种提供的产出模型。 这意味着,如果你试图做比你分配给桌子的更多的读写,那么你的申请将出现错误。

AWS已经做了一些工作,帮助:

  • The AWS SDK clients will automatically retry the request several times before you see a ProvisionedThroughputExceededException
  • Up to five minutes of unused capacity can be consumed in bursts to accommodate spikes in requests
  • You can increase the provisioned read/writes on a table an unlimited number of times each day (to perform more reads/writes per second)
  • You can decrease the provisioned throughput on a table 9 times a day (4 times in the first 4 hours, and 1 each in the rest 4 hours window) (to save money)
  • You can use Dynamic DynamoDB, a 3rd party app, to automatically manage scaling up and down the provisioned throughput

根据你正在制造的那类情况,你可以做几件事来处理这些错误:

  • Batch or long-running applications can back off and retry these requests if they occur to limit the table usage
  • When bulk loading or bulk reading from a table you can manually scale up the throughput and scale down after you are done
  • For a transactional application you can ensure you have your provisioned throughput above the level required to run the application
  • Use Dynamic DynamoDB or script changes to table throughput yourself




相关问题
CSV file to AWS Dynamo DB Design

我对美国妇女论坛来说是新鲜事,即将通过美国妇女论坛主办一个网站。 我的卷宗中有一些数据(约200万个)。 我每个月都得到新的数据。 新的骑士团对......进行了更新。

Explain Merkle Trees for use in Eventual Consistency

Merkle Trees are used as an anti-entropy mechanism in several distributed, replicated key/value stores: Dynamo Riak Cassandra No doubt an anti-entropy mechanism is A Good Thing - transient failures ...

热门标签