Today, my fairly simple requests to my West Europe document intelligence instance are taking 5+ minutes to complete. So I tried with a really simple bit of code and a really simple PDF file (just 3 sentences of text):
using Azure;
using Azure.AI.DocumentIntelligence;
var credential = new AzureKeyCredential("xxxx");
var client = new DocumentIntelligenceClient(new Uri($"https://xxxx.cognitiveservices.azure.com/"), credential);
string modelId = "prebuilt-read";
string filePath = @"xxxx";
var analyzeDocumentContent = new AnalyzeDocumentContent();
analyzeDocumentContent.Base64Source = BinaryData.FromBytes(File.ReadAllBytes(filePath));
var operation = await client.AnalyzeDocumentAsync(WaitUntil.Completed, modelId, analyzeDocumentContent);
AnalyzeResult result = operation.Value;
Console.WriteLine($"Document was analyzed with model with ID: {result.ModelId}");
foreach (AnalyzedDocument document in result.Documents)
{
Console.WriteLine($"Document of type: {document.DocType}");
foreach (KeyValuePair<string, DocumentField> fieldKvp in document.Fields)
{
string fieldName = fieldKvp.Key;
DocumentField field = fieldKvp.Value;
Console.WriteLine($"Field '{fieldName}': ");
Console.WriteLine($" Content: '{field.Content}'");
Console.WriteLine($" Confidence: '{field.Confidence}'");
}
}
This also took 5+ minutes.
So then I tried on the Document Intelligence Studio - also 5 minutes.
What's more worrying is if I check the metrics in the Azure portal, despite only sending about 7 requests, I see 2540 calls in the last hour:
Any idea about what's going on?