我的Azure Cosmos DB中有1000 RU/s的吞吐量,还有大约290个查询要执行。我总是收到太大的例外请求。
每个查询都有12个属性和1个分区键,但我仍然认为,使用1000 RU/s,应该正确地执行查询。
我有一个gremlinClient
public static GremlinClient GetGremlinClient()
{
var gremlinServer = new GremlinServer(Endpoint, Port, enableSsl: true,
username: "/dbs/" + Databasename + "/colls/" + Collectionname, password: Authkey);
var gremlinClient = new GremlinClient(gremlinServer, new GraphSON2Reader(), new GraphSON2Writer(),
GremlinClient.GraphSON2MimeType);
return gremlinClient;
}一个示例查询。我只是想增加顶点
G.addV(“经验”).property(‘_test’,'dummy').property('someProperty‘),’所有部门的业务流程的文档,以及为中型工业企业明智地选择ERP-系统的管理级别;角色:项目管理).property(“某某物业”,2016年).property(“某某物业”,“奥芬”).property(“某某物业”,“虚拟”).property(“某某物业”,‘EN’).property(‘某某物业’,‘产业’.property(‘某某物业’),‘整个公司的流程文件为一个深刻的ERP-系统的选择’)。
每个查询执行所有查询。
foreach (string query in queries)
{
await gremlinClient.SubmitAsync<dynamic>(query);
}我所犯的错误
服务器错误:\r\n\n tActivityId: 2312f64f-b865-49cc-bb26-843d46313199\nExceptionType : RequestRateTooLargeException\nExceptionMessage :\r\n\tMessage:{\“错误\”:\“请求速率很大\”}\n\tActivityId:157 daf87-3238-4e1c-9a81-41bcd6d7c2e1,请求URI: /apps/413f848b-ce17-40fc-ad7f-14c0e21e9633/services/29abd22a-4e74-48c1-aab3-b311be968829/partitions/9e4cb405-4f74-4d7f-8d12-26e79b910143/replicas/132142016542682221s/,RequestStats:\r\n\tRequestStartTime: 2019-10-24T09:27:38.2395067Z,RequestEndTime: 2019-10-24T09:27:38.2395067Z,尝试区域数:1\n\n\tResponseTime: 2019-10-24T09:27:38.2395067Z
这是一个简单的代码,我不明白我能在其中改变什么。
是否有办法重试对同一点的请求,或以某种方式不获取错误或避免错误?
发布于 2019-10-25 05:09:16
您收到的例外是Request*Rate*TooLargeException,这意味着您在短时间内提交了太多的请求。
对于运行批量操作,您应该使用供应商专用工具。
https://stackoverflow.com/questions/58519777
复制相似问题