Container apps - request limit quota?

Michael Cowling 20 Reputation points
2024-11-27T09:14:48.9133333+00:00

We're using container apps for our service.

When we do load testing, we sometimes see:

{"error":{"code":"TooManyRequests","message":"Request is rejected because the request rate is too high."}}

in the Console logs.

I can't see any mention of a 'request' quota in the container apps documentation.

I think this error code is actually related to scaling the replicas? But even this should be within the limits. I have a max replicas of 12 and we're using the 8 core dedicated machines which should stay within the 100 core limit (8*12 = 96).

I can also do a load test of 'hey -n 100000' (https://github.com/rakyll/hey) and the server can respond with 100k 200 status codes. So I don't think it's the raw number of requests.

Our typical requests are very CPU intensive. Even 10 simultaneous requests after a few minutes can run into this rate limit.

Any help or ideas appreciated!

Azure Container Apps
Azure Container Apps
An Azure service that provides a general-purpose, serverless container platform.
474 questions
0 comments No comments
{count} votes

Accepted answer
  1. TP 100.2K Reputation points
    2024-11-29T17:35:41.4633333+00:00

    Hi Michael,

    From your description it seems you are refreshing the logstream too often and you are being throttled as a result. When you use the portal and view the console logstream, the Azure portal makes requests to the API. The various Azure APIs have request limits, some of which are published while others are not.

    Is there another way you can achieve your goal instead of relying on the console log in the portal? For example, can you send key status messages to another endpoint which logs to files, and then view the files?

    Or, another potential is to view the log stream not via the portal but using a different method. For example, you would write small script that makes the requests to view the log in a more controlled manner (and maybe using different parameters) so as to not trigger throttling.

    Please click Accept Answer and upvote if the above was helpful.

    Thanks.

    -TP

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Shireesha Eeraboina (Quadrant Resource LLC) 235 Reputation points Microsoft Vendor
    2024-11-28T14:51:55.9833333+00:00

    Hi @Michael Cowling ,

    Welcome to the Microsoft Q&A Platform! Thank you for your question.

    1.Ensure you're not exceeding your subscription's request limits. You can change the quota increase through the Azure portal if needed.

    2.When you get a "TooManyRequests" error, make your app wait longer before retrying the request, increasing the wait time each time.

    3.Ensure your containers are using resources efficiently. You may need to adjust the number of replicas or the resources allocated to each replica.

    4.Use Azure Monitor to track requests and see patterns that may cause the rate limit to be hit.

    If none of these steps resolve the issue, here is a link to the Azure Container Apps documentation that may be helpful: https://learn.microsoft.com/en-us/azure/container-apps/quotas

    I hope this helps! Let me know if you have any further questions.

    Thank you.


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.