Only Some document is not added and gives 'RateLimitError'

Vimal Lalani 20 Reputation points
2026-07-08T03:18:46.41+00:00

Hi Team,

I am facing an issue while uploading documents to Azure AI Search. Most documents are indexed successfully, but some seemingly similar documents fail with a RateLimitError. The failed documents appear to be random, and there doesn't seem to be any obvious difference between the documents that succeed and those that fail.

Issue Detail:

  • Using Azure AI Search to index documents.
  • Majority of documents are added successfully.
  • Some random documents fail with a RateLimitError.

Question:

What is the recommended approach to handle or prevent these errors?

Please avoid posting generic AI-generated responses. I have already tried many such suggestions without success. I'm looking for advice from people who have encountered this issue themselves or can provide guidance based on Azure AI Search documentation and practical experience.

Azure AI Search
Azure AI Search

An Azure search service with built-in artificial intelligence capabilities that enrich information to help identify and explore relevant content at scale.


Answer accepted by question author
Christos Panagiotidis 3,551 Reputation points
2026-07-15T06:51:31.6233333+00:00

Because embeddings are generated in the Databricks notebook before the Documents Push call, this is most likely Azure OpenAI deployment throttling—not an Azure AI Search indexing limit. A Standard Search tier will not remove that 429.

The useful change is a single, deployment-wide rate limiter shared by all Databricks tasks. Do not let every partition retry independently. Queue embedding calls by deployment, cap in-flight calls, and when one call gets 429, pause the whole queue for the returned retry-after-ms period (plus jitter), then retry only the failed documents using their existing deterministic Search keys.

Similar documents can appear random because request rate is evaluated in short windows, not only as a per-minute total. Log x-ratelimit-limit/remaining-requests, x-ratelimit-limit/remaining-tokens, and retry-after-ms for each embedding call. That will show whether RPM or TPM is exhausted.

If those limits are routinely near zero, allocate more TPM or use a separate embedding deployment for bulk indexing so query traffic cannot contend with it. If the 429 says temporary capacity rather than rate limit, Search scaling will not help; reduce concurrency and retry after the supplied delay.

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

0 additional answers

Sort by: Newest

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.