StackExchange / StackExchange/StackExchange.Redis
Long await time & Timeouts
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 6.2k
- Forks
- 1.6k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 43
Description
Hi, for a while now we have started seeing some very slow calls, and the profiler in our Azure App Service shows us it's due to awaiting in Stackexchange.Redis:

I'm unsure about how often this happens,
We are on:
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="6.0.14" />
<PackageReference Include="StackExchange.Redis" Version="2.6.90" />
I have also caught several RedisTimeoutException
Timeout awaiting response (outbound=0KiB, inbound=0KiB, 5016ms elapsed, timeout is 5000ms),
command=HMGET,
next: HMGET String_NullableProtoDateTime_cLNgWIxRdf7GIrkKW6LBMThPkeuKejPcsiLwiyu115Q=,
inst: 0, qu: 0, qs: 0, aw: False, bw: SpinningDown, rs: ReadAsync, ws: Idle, in: 0, last-in: 0, cur-in: 0, sync-ops: 0, async-ops: 2537900,
serverEndpoint: xxx-prod.redis.cache.windows.net:6380, conn-sec: 53289.39, mc: 1/1/0, mgr: 10 of 10 available,
clientName: pd1ldwk0002JP(SE.Redis-v2.6.90.64945), IOCP: (Busy=0,Free=1000,Min=4,Max=1000),
WORKER: (Busy=5,Free=32762,Min=4,Max=32767), POOL: (Threads=12,QueuedItems=0,CompletedItems=6251437),
v: 2.6.90.64945 (Please take a look at this article for some common client-side issues that can cause timeouts:
https://stackexchange.github.io/StackExchange.Redis/Timeouts)
This shows the conn-sec: 53289.39 being very high, and not necessarily a lack of worker threads.
I'm not even sure if these two problems are related to the same root cause.
What can I do to investigate this issue better?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The report concerns StackExchange.Redis 2.6.90 and Microsoft.Extensions.Caching.StackExchangeRedis 6.0.14, with profiler data and a RedisTimeoutException as its main evidence. Start with the linked StackExchange.Redis timeouts article and the captured diagnostics; the issue names no source files or tests and does not define a concrete change or completion criterion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, redis
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100