Skip to content

Commit b6da857

Browse files
authored
Merge pull request #78823 from roaror/master
PR for Cosmos DB's API for MongoDB - Troubleshooting common issues
2 parents 99eb369 + 13c08ed commit b6da857

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

articles/cosmos-db/TOC.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,8 @@
362362
href: manage-mongodb-with-resource-manager.md
363363
- name: Manage using PowerShell
364364
href: powershell-samples-mongodb.md
365+
- name: Troubleshoot common issues
366+
href: mongodb-troubleshoot.md
365367
- name: Gremlin API
366368
displayName: graph, graph database
367369
items:
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
title: Troubleshoot common errors in Azure Cosmos DB's API for Mongo DB
3+
description: This doc discusses the ways to troubleshoot common issues encountered in Azure Cosmos DB's API for MongoDB.
4+
author: roaror
5+
ms.service: cosmos-db
6+
ms.subservice: cosmosdb-mongo
7+
ms.topic: conceptual
8+
ms.date: 06/05/2019
9+
ms.author: roaror
10+
11+
---
12+
13+
# Troubleshoot common issues in Azure Cosmos DB's API for MongoDB
14+
15+
Azure Cosmos DB implements the wire protocols of common NoSQL databases, including MongoDB. Due to the wire protocol implementation, you can transparently interact with Azure Cosmos DB by using the existing client SDKs, drivers, and tools that work with NoSQL databases. Azure Cosmos DB does not use any source code of the databases for providing wire-compatible APIs for any of the NoSQL databases. Any MongoDB client driver that understands the wire protocol versions can connect to Azure Cosmos DB.
16+
17+
While Azure Cosmos DB's API for MongoDB is compatible with 3.2 version of the MongoDB's wire protocol (the query operators and features added in version 3.4 are currently available as a preview), there are some custom error codes that correspond to Azure Cosmos DB specific errors. This article explains different errors, error codes, and the steps to resolve those errors.
18+
19+
## Common errors and solutions
20+
21+
| Error | Code | Description | Solution |
22+
|---------------------|-------|--------------|-----------|
23+
| TooManyRequests | 16500 | The total number of request units consumed is more than the provisioned request-unit rate for the collection and has been throttled. | Consider scaling the throughput assigned to a container or a set of containers from the Azure portal or you can retry the operation. |
24+
| ExceededMemoryLimit | 16501 | As a multi-tenant service, the operation has gone over the client's memory allotment. | Reduce the scope of the operation through more restrictive query criteria or contact support from the [Azure portal](https://portal.azure.com/?#blade/Microsoft_Azure_Support/HelpAndSupportBlade). Example: `db.getCollection('users').aggregate([{$match: {name: "Andy"}}, {$sort: {age: -1}}]))` |
25+
| MongoDB wire version issues | - | The older versions of MongoDB drivers are unable to detect the Azure Cosmos account's name in the connection strings. | Append *appName=@**accountName**@* at the end of your Cosmos DB's API for MongoDB connection string, where ***accountName*** is your Cosmos DB account name. |
26+
27+
28+
## Next steps
29+
30+
- Learn how to [use Studio 3T](mongodb-mongochef.md) with Azure Cosmos DB's API for MongoDB.
31+
- Learn how to [use Robo 3T](mongodb-robomongo.md) with Azure Cosmos DB's API for MongoDB.
32+
- Explore MongoDB [samples](mongodb-samples.md) with Azure Cosmos DB's API for MongoDB.
33+

0 commit comments

Comments
 (0)