How to solve the 429 error in custom vision prediction resource

Janssen Pedrola 15 Reputation points
2023-08-18T01:25:58.2066667+00:00

Hi guys,

I trained an image classification model in Microsoft Azure and created a client that will send image to it. I was able to successfully classify some images:

1st Attempt: 728 / 7178

2nd Attempt: 1305 / 7178

So i checked the resources in my prediction resource and saw this under monitoring tab:
User's image

User's image

The requests seems to get in the model but a 429 error blocked it. And I searched about it and this was because of too many requests, how can i solve this?

Azure AI Custom Vision
Azure AI Custom Vision
An Azure artificial intelligence service and end-to-end platform for applying computer vision to specific domains.
247 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Janssen Pedrola 15 Reputation points
    2023-08-20T22:44:43.52+00:00

    Hi , as per checking limits and quotas, what I'm trying to do still follows it. Nevertheless, I found a solution for my problem.

    Adding some wait time before sending another image to the model will do the trick. Sending image to the model from client with a code like this will send many requests in just a second, hence, introducing delay will prevent the too many requests error (429)

    User's image

    1 person found this answer helpful.
    0 comments No comments

  2. VasaviLankipalle-MSFT 17,121 Reputation points
    2023-08-18T21:13:50.78+00:00

    Hello @Janssen Pedrola , Thanks for using Microsoft Q&A Platform.

    Yes, as per the error message it looks like rate limit has exceeded. We can also see the spikes in the graph, so I would suggest considering optimizing this to reduce the number of requests being sent to the service. https://video2.skills-academy.com/en-us/azure/ai-services/custom-vision-service/limits-and-quotas

    So, please try this and let us know. To check the logs: https://video2.skills-academy.com/en-us/azure/ai-services/custom-vision-service/faq#how-can-i-write-logs-on-this-service-

    I hope this helps.

    Regards,

    Vasavi

    -Please kindly accept the answer and vote 'yes' if you feel helpful to support the community, thanks.

    0 comments No comments

Your answer

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