SOLVED

ComputerVision throttling problem

Copper Contributor

Hi!

I have a ComputerVision resource in Azure, which I use with my subscription credit for development. The maximum allowed plan is S1, which allows up to 10 calls per second.

I have a WebJob to analyze a picture, and when I run it locally, it works perfectly fine. But when I run it in Azure, I get a 'TooManyRequests' Exception.

Anyway, I'm just running a single call at once for testing purposes, but still I run into throttling.

Any idea how I can analyze better what's happening? Or does anyone know if a single call to ComputerVisionClient.RecognizeTextAsync produces more than one call to the API? This could explain it, because running it locally means a much slower connection to the API. 

Ah, there is a mayor difference. When running locally I send a stream. But when running in Azure, I send an AzureBlobStorage url with SAS. 

1 Reply
best response confirmed by Stefan81 (Copper Contributor)
Solution
To finally close this... I wasn't aware of the internals of the library I'm using. But to get the results from the cognitive service, we have to poll, which was happening much faster in Azure, so it didn't run into throttling locally. Not the most elegant solution, but it works.
1 best response

Accepted Solutions
best response confirmed by Stefan81 (Copper Contributor)
Solution
To finally close this... I wasn't aware of the internals of the library I'm using. But to get the results from the cognitive service, we have to poll, which was happening much faster in Azure, so it didn't run into throttling locally. Not the most elegant solution, but it works.

View solution in original post