Azure Container Apps not scaling as expected

Tung Nguyen Xuan 65 Reputation points
2025-02-25T06:50:56.6133333+00:00

Hi team Microsoft,

I'm trying to get my FastAPI app to scale with Azure Container Apps but can't seems to get it working as wanted. I expect the container app to scale horizontally for every request, but truth is when I send concurrent requests, it would be one replica taking all requests at a time, which I think later caused Critical error because the worker taking too long to response.

[CRITICAL] WORKER TIMEOUT (pid:10) [ERROR] Worker (pid:10) was sent code 134!

For reference, my azure container app would take a request from client, response instantly with a webhook and do some cpu-bound tasks (chunking, embedding texts) with FastAPI's background tasks.

Questions:

  • How do I make scaling work here? the Concurrent requests param doesn't seem to work
  • Would Azure queue storage work in this case?

User's image

My scaling rule:

User's image

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

1 answer

Sort by: Most helpful
  1. Tung Nguyen Xuan 65 Reputation points
    2025-02-27T03:21:53.7266667+00:00

    I found a solution

    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.