{"section":"known-issues","requestedLocale":"en","requestedSlug":"the-scroll-api-returns-429-andor-408-errors-when-querying-entities-with-a-large-number-of-documents-typically-exceeding-millions","locale":"en","slug":"the-scroll-api-returns-429-andor-408-errors-when-querying-entities-with-a-large-number-of-documents-typically-exceeding-millions","path":"docs/en/known-issues/Storage/the-scroll-api-returns-429-andor-408-errors-when-querying-entities-with-a-large-number-of-documents-typically-exceeding-millions.md","branch":"main","content":"## Summary\n\n\nThe Scroll API is designed to handle large datasets by enabling the retrieval of documents in a scrollable manner. However, when querying entities with a significant number of documents, typically in the millions, users may encounter 429 (Too Many Requests) and/or 408 (Request Timeout) errors. These errors arise due to the high volume of data being processed, which can overwhelm the API and result in request rate limiting or timeouts.\n\n\n#### Simulation\n\n\n\n1. Use the Scroll API to query an entity containing a large number of documents (e.g., millions).\n2. Observe the responses from the API.\n3. Note if the API returns 429 (Too Many Requests) and/or 408 (Request Timeout) errors during the process.\n\n\n#### Workaround\n\n\nOptimize the query implementing filters to reduce the load on the API by breaking down the request into smaller chunks or batches.\nWhen choosing filters, it is important to pay attention to whether all documents will be included to ensure that the scroll will go through all of the entity's documents."}