Navigation

MongoDB Service Limitations

Overview

You can access most of the CRUD and Aggregation functionality of MongoDB version 3.6 with the MongoDB service; however, Stitch does not support all operations and features available in standard tools and clients. This page lists MongoDB features that are not available when you connect to MongoDB through Stitch.

System Users

The CRUD API and Aggregation Framework limitations on this page do not apply to queries executed from a System Function.

Notable Unsupported Features

CRUD Operations

Query Results

MongoDB queries executed through Stitch can return a maximum of 50,000 documents. If you need to return more documents, consider paginating your query.

Query Operators

System Users

Stitch supports all query operators, including those listed in this section, when you execute a query from a System Function.

Stitch supports most query operators but does not support some operator types for queries that run in the context of an application user. Refer to the following table for details on a specific type of operator:

Operator Type Supported Unsupported
Comparison Operators
No unsupported operators
Logical Operators
No unsupported operators
Array Operators
No unsupported operators
Element Operators
No unsupported operators
Evaluation Operators
Geospatial Operators No supported operators
Bitwise Operators No supported operators

Update Operators

System Users

Stitch supports all update operators, including those listed in this section, when you execute a query from a System Function.

Stitch supports most update operators but does not support some operators for updates that run in the context of an application user. Refer to the following table for details on a specific operator:

Operator Type Supported Unsupported
Field Update Operators
No unsupported operators
Array Update Operators
Array Update Modifiers
No unsupported operators
Array Update Modifiers
No unsupported operators

Bulk Write Operations

System Users

Stitch supports all bulk write operations, including those listed in this section, when you execute the operation from a System Function.

Stitch does not support most bulk write operations. Refer to the following table for details on a specific bulk write operation:

Bulk Operation Supported Notes
insertOne/insertMany Yes Bulk insert operations through Stitch are always ordered. If any insert in an ordered bulk operation fails, the operation returns immediately without inserting any more documents.
updateOne/updateMany No  
deleteOne/deleteMany No  

Query Options

System Users

Stitch supports all query options, including those listed in this section, when you execute a query from a System Function.

Stitch does not support configuring the following options for any CRUD operation:

Aggregation Framework

Aggregation Stages

System Users

Stitch supports all aggregation stages, including those listed in this section, when you run a pipeline from a System Function.

Stitch does not support the following aggregation pipeline stages when you run an aggregation pipeline in the context of an application user:

Administration

Database Commands

Stitch does not support any database commands in the Client SDKs or Functions. You can, however, call a limited subset of database commands when when connected to a MongoDB cluster over the Stitch wire protocol.

The following database commands are partially supported over the wire protocol:

Command Details
find

The following find command options are not supported:

  • hint
  • skip
  • batchSize
  • comment
  • maxScan
  • maxTimeMS
  • readConcern
  • max
  • min
  • returnKey
  • showRecordId
  • tailable
  • awaitData
  • oplogReplay
  • noCursorTimeout
  • allowPartialResults
  • collation
aggregate

The following aggregate command options are not supported:

  • explain
  • allowDiskUse
  • maxTimeMS
  • readConcern
  • collation
  • bypassDocumentValidation
  • hint
  • comment
  • writeConcern
count

The following count command options are not supported:

  • limit
  • skip
  • hint
  • readConcern
insert

The following insert command options are not supported:

  • writeConcern
  • bypassDocumentValidation
update

The following update command options are not supported:

  • bypassDocumentValidation
  • collation
  • arrayFilters
delete

The following delete command options are not supported:

  • collation

Change Streams

Stitch limits the total number of change streams open against a given cluster across all Stitch apps based on the cluster’s size. It also limits the number of client applications that can concurrently listen for changes using Watch and Mobile Sync. The following table lists the limitations for each cluster size:

Cluster Size Maximum Number of Change Streams Maximum Number of Concurrent Listening Clients
Free Tier (M0) 5 250
Shared Clusters (M2/M5) 10 500
Small, Dedicated Clusters (M10/M20) 100 1000
Standard Clusters (M30/M40) 1000 10000
Standard Clusters (M50 - M90) 1000 50000
High-Power Clusters (M100+) 1000 100000 (Contact Support for Additional Usage)

Note

Stitch opens a single change stream on each collection that is associated with a Database Trigger, Collection Sync, or Watch operation.

Usage Recommendation

To minimize the number of concurrent listening clients and open change streams:

  • Start Watch and Sync operations only when necessary. Close any open Watch and Sync streams immediately when they’re no longer necessary.
  • Avoid data models that require you to Watch or Sync an unbounded number of collections.