Azure Cosmos DB Gremlin limits
APPLIES TO: Gremlin API
This article talks about the limits of Azure Cosmos DB Gremlin engine and explains how they may impact customer traversals.
Cosmos DB Gremlin is built on top of Cosmos DB infrastructure. Due to this, all limits explained in Azure Cosmos DB service limits still apply.
When Gremlin limit is reached, traversal is canceled with a x-ms-status-code of 429 indicating a throttling error. See Gremlin server response headers for more information.
|Script length||64 KB||Maximum length of a Gremlin traversal script per request.|
|Operator depth||400||Total number of unique steps in a traversal. For example,
|Degree of parallelism||32||Maximum number of storage partitions queried in a single request to storage layer. Graphs with hundreds of partitions will be impacted by this limit.|
|Repeat limit||32||Maximum number of iterations a
|Traversal timeout||30 seconds||Traversal will be canceled when it exceeds this time. Cosmos DB Graph is an OLTP database with vast majority of traversals completing within milliseconds. To run OLAP queries on Cosmos DB Graph, use Apache Spark with Graph Data Frames and Cosmos DB Spark Connector.|
|Idle connection timeout||1 hour||Amount of time the Gremlin service will keep idle websocket connections open. TCP keep-alive packets or HTTP keep-alive requests don't extend connection lifespan beyond this limit. Cosmos DB Graph engine considers websocket connections to be idle if there are no active Gremlin requests running on it.|
|Resource token per hour||100||Number of unique resource tokens used by Gremlin clients to connect to Gremlin account in a region. When the application exceeds hourly unique token limit,