Why has this Azure AI translate request "exceeded request limits"?

Blixtor 0 Reputation points
2023-11-22T10:07:19.6366667+00:00

I'm trying to send the attached API translate request (key and region X-ed out) but get an unexpected error with code 429001 and message "The server rejected the request because the client has exceeded request limits.". The request is trying to translate 190 HTML strings with a total content-length of 45099.

Based on this documentation , the limits should be 50000 for content length and 1000 for number of strings to translate, my request is well under both of these.

Sending short requests with 2 HTML strings to translate works for me. In case it is relevant, I'm on a "F0 Free" subscription tier.

I've attached the request and response (https-request.txt). Why do I get the 429 error code?

And for bonus points, what is the distinction between the 429000, 429001 and 429002 error codes, all of which are documented as "The server rejected the request because the client has exceeded request limits."?

Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
2,464 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Blixtor 0 Reputation points
    2023-11-23T16:04:54.7633333+00:00

    I managed to resolve the problem.

    The returned error "The server rejected the request because the client has exceeded request limits." refers to "Character limits per hour" - which seem to be enforced on a sliding window per minute. See the linked documentation page

    With my "F0 Free" subscription tier, the hourly limit is 2 million characters, i.e. around 33,000 characters per minute. As my single request has more than 33,000 characters, it is rejected right away.

    I've tested this with sending three (identical) requests of around 13,000 characters each right after each other. The first two get translated, the third request - which brings the total above 33,000 - gets rejected with the above error message.

    After waiting for a minute I get the same behavior again.

    The documentation on the linked page is somewhat vague on the "Character limits per hour":

    The hourly quota should be consumed evenly throughout the hour. [...] You're likely to receive an out-of-quota response under the following circumstances:
    You've reached or surpass the quota limit.
    You've sent a large portion of the quota in too short a period of time.

    The error message could also be improved, pointing to the "limits per hour", especially as these limits can supersede the per request limits documented above.

    0 comments No comments

  2. YutongTie-MSFT 47,096 Reputation points
    2023-11-26T22:47:14.3266667+00:00

    @Blixtor

    Thanks a lot for your confirmation and feedback, especially the feedback here -

    The error message could also be improved, pointing to the "limits per hour", especially as these limits can supersede the per request limits documented above.

    I will forward your feedback to product team to see how we can improve the error message to make it more helpful, again, thanks a lot.

    Regards,

    Yutong

    0 comments No comments

  3. yu ben 0 Reputation points
    2024-05-09T22:22:42.2366667+00:00

    I'm getting this error in the document translation api. But my test document is just over 10 characters.

    {
    	"error": {
    		"code": "InvalidRequest",
    		"message": "The server rejected the request because the client has exceeded request limits.",
    		"target": "",
    		"innerError": {
    			"code": "AppIdOverQuota",
    			"message": "The server rejected the request because the client has exceeded request limits."
    		}
    	}
    }
    
    0 comments No comments