通过批量提取脚本中途抛出ServiceUnavailableException [英] ServiceUnavailableException thrown mid-way through a bulk ingestion script
问题描述
我正在使用Node.js脚本将大量节点和边缘摄取到Cosmos图中。使用教程github repo中提到的npm gremlin包。 https://github.com/Azure-Samples/azure-cosmos-db-graph-nodejs-getting-started
I'm using a Node.js script to ingest large number of nodes and edges into Cosmos graph. Using the npm gremlin package as mentioned in the tutorial github repo.https://github.com/Azure-Samples/azure-cosmos-db-graph-nodejs-getting-started
很快它开始失败了  ; RequestRateTooLargeException异常
Soon it started failing with RequestRateTooLargeException
Cosmos DB不支持多行gremlin脚本显然。所以不得不诉诸多个电话。 RequestRateTooLargeException通过将吞吐量滑块增加到10K然后100K然后
1M来解决。这增加了成本因素,但现在我有兴趣将性能与大图比较
现在脚本在中途失败(大约在6k节点+ 15k边缘之后),发生ServiceUnavailableException。后续调用都失败相同。 (但是通过azure门户网站,我仍然可以执行
gremlin查询。)
这是部分堆栈跟踪:
ActivityId:26a702c6-875c-4710-9d6c-ff091508e0c3
ActivityId : 26a702c6-875c-4710-9d6c-ff091508e0c3
ExceptionType: ServiceUnavailableException
ExceptionType : ServiceUnavailableException
ExceptionMessage:
ExceptionMessage :
服务目前无法使用。
ActivityId:acd1a93e-a879-4763-bb88-b2c4d8304acb,
ActivityId: acd1a93e-a879-4763-bb88-b2c4d8304acb,
推荐答案
嗨Gishu,
Hi Gishu,
如果对Gremlin使用.NET BulkExecutor库,则可以使用管理限制和其他错误处理的框架来执行批量加载操作。这是批量操作的推荐方法。
If you use the .NET BulkExecutor library for Gremlin, you can perform bulk load operations with a framework that manges throttling and other error handling. It is the recommended method for bulk operations.
使用图表BulkExecutor .NET库在Azure Cosmos DB Gremlin API中执行批量操作(链接)。
Using the graph BulkExecutor .NET library to perform bulk operations in Azure Cosmos DB Gremlin API (Link).
使用Node。 js,你必须编写大部分逻辑。
With Node.js, you have to code much of this logic.
我希望这会有所帮助。
这篇关于通过批量提取脚本中途抛出ServiceUnavailableException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!