Cache for Redis: Intermittent Connection Timeouts from Container Apps — Troubleshooting Connectivity Issues

Owen-5717 0 Reputation points
2026-11-27T22:46:13.4033333+00:00

Problem description

I am experiencing intermittent connection timeouts with Azure Cache for Redis when accessed from my Container Apps Consumption environment. The connections sometimes stall or fail after a certain period, affecting my application's performance. While these timeouts have occurred occasionally before, in the last 48 hours there seems to have been a larger degradation, with hundreds of these connection timeouts on consumption workloads.

Environment

Azure Cache for Redis, private endpoint, East US 2 region.

What I've already tried

I have reduced producer timeouts, captured traffic comparisons between stalled and successful flows, and moved the main worker pool to dedicated capacity. The move to dedicated capacity seems to stop these timeouts, but isn't an ideal long term solution.

Current status

I am seeking assistance to identify the root cause of these intermittent Redis connection stalls and understand whether broader platform issues or specific network path problems might be involved.

Thanks for the help.

Azure Container Apps
Azure Container Apps

An Azure service that provides a general-purpose, serverless container platform.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Rukshan edirisinghe 3,100 Reputation points
    2026-11-28T02:19:19.1633333+00:00

    Hi @Owen-5717

    The fact that moving the workers to dedicated capacity stopped the timeouts is the strongest clue. It points to the client side rather than Redis itself, because the cache and private endpoint stayed the same. Microsoft's Redis timeout guide lists client-side causes first, and two of them fit consumption replicas well:

    • High client CPU. If the app can't process responses fast enough, requests time out even though Redis answered quickly. Microsoft recommends keeping client CPU under 80%.
    • Traffic bursts and thread pool limits. A burst can queue requests behind a small thread pool, and they time out before they're even sent.

    What I'd check:

    1. Replica CPU and memory in the Container Apps metrics for the consumption workers, during the windows with timeouts. If they spike near their limits, give them more CPU per replica or let them scale out sooner.
    2. Connection reuse. Make sure each replica creates one Redis client or connection multiplexer and reuses it. New connections per request quickly cause high client connections, which Microsoft also lists as a cause.
    3. Keep-alive. Azure Cache for Redis closes connections that sit idle for 10 minutes. Set your client's keep-alive or heartbeat well under that, so quiet workers don't hit a dead connection on their next call.
    4. Server side, to rule it out: look at the cache's Server Load, Connected Clients and Errors metrics for the same timestamps. If those stay low while timeouts spike, that confirms the problem sits on the consumption side.

    Which Redis client library and version are the workers using?

    If these checks show the cause, please consider accepting it as the answer. If the client side looks healthy, let me know what the server metrics show and I'll be happy to keep helping.

    Reference:

    Was this answer helpful?

    0 comments No comments

Your answer

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