Getting "Connection to timed out. (connect timeout=300)" when doing many calls to begin_analyze_document

Mauricio Villegas 0 Reputation points

We are trying out azure document intelligence from python. In particular we are using client.begin_analyze_document() with model id prebuilt-read. When we are doing a load test, a large amount of requests continuously for several minutes, we are getting a timeout error. From the docs we were expecting a 429 error, instead of a timeout, see here. This is problematic because instead of a failure which could be used to control the requests rate and do retries, the calls just take a long time delaying the entire process.

Do we have wrong expectations of getting a 429 error? Or are we misconfiguring something which is why we get the timeout behavior?

We have tried both azure-ai-formrecognizer and the new azure-ai-documentintelligence which both produce the timeouts. And the stack trace we get is attached.




Azure AI Document Intelligence
Azure AI Document Intelligence
An Azure service that turns documents into usable data. Previously known as Azure Form Recognizer.
1,528 questions
{count} votes