408 Timeout Responses
If your queries target large collections and match thousands of documents, you may recieve a 408 Request Timeout response status code. For more information, see the official Mozilla Developer Network (MDN) Web Docs > "408 Request Timeout" topic.
To manage performance and prevent potential performance issues that may occur due to attempting to retrieve many documents in a single query, by default, sets of matching documents are limited to a count of 1000.
To resolve this error, break down one large query into several selective queries; for example, the following cURL request:
- Retrieves documents within the people collection with the field property of name set to the value of John.
- Limits the number of results returned to 2.
- Instructs to sort results by _id in ascending (asc) order.
- Indicates that the response is to include not only the values but also information (latestValuesAndTypes) about their types.
Once invoked, the following response is returned: