Skip to content

Timeouts observed with StackExchange.Redis under load #3029

@SachinRamRN

Description

@SachinRamRN

We are experiencing frequent Timeout awaiting response errors while using StackExchange.Redis (v2.10.1) against an Azure Redis Cache C0 instance
Currently, the Redis cache stores minimal data, but under moderate load (~hundreds of requests/sec), we see a large number of timeouts.

Timeout awaiting response (outbound=0KiB, inbound=0KiB, 6500ms elapsed, timeout is 5000ms), command=GET, next: SET 2700758, inst: 0, qu: 0, qs: 0, aw: False, bw: SpinningDown, rs: ReadAsync, ws: Idle, in: 371, last-in: 2, cur-in: 0, sync-ops: 1, async-ops: 363, serverEndpoint: 20.198.145.151:8501, conn-sec: 80376.19, aoc: 0, mc: 1/1/0, mgr: 10 of 10 available, clientName: f1fd87ec2fb3(SE.Redis-v2.10.1.65101), PerfCounterHelperkeyHashSlot: 6029, IOCP: (Busy=0,Free=1000,Min=1,Max=1000), WORKER: (Busy=20,Free=32747,Min=2,Max=32767), POOL: (Threads=20,QueuedItems=69,CompletedItems=1218359,Timers=36), v: 2.10.1.65101 (Please take a look at this article for some common client-side issues that can cause timeouts: https://stackexchange.github.io/StackExchange.Redis/Timeouts)

The CPU usage on both the application and Redis server is minimal, around 30–50%, so this does not appear to be CPU-bound.
We are using a single ConnectionMultiplexer across the application.

string redisConnectionString = Configuration.GetSection("Redis").GetSection("ConnectionString").Value; var redisConnection = ConnectionMultiplexer.Connect(redisConnectionString);

The logs show many in-flight commands, which makes us wonder whether these timeouts indicate that the messages have reached the client kernel, or if they are queued somewhere in the client library or network stack. We would like to understand what “in:342” generally means does it indicate requests that have been sent to Redis but not yet acknowledged, or does it include requests still queued inside the client library?

We also notice the POOL thread count in the logs is 20, and we would like to understand how these internal threads are allocated, whether they are dedicated or shared from the global thread pool, and how they affect request processing.

We are trying to determine whether these timeouts are caused by network-bound limitations on the C0 tier, client-side saturation due to a single multiplexer and many in-flight commands, or inherent throughput limits of the C0 instance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions