StackExchange / StackExchange/StackExchange.Redis

Redis Stack Exchange Timeout performing SCAN (5000ms) issue

Open
#2,447 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
6.2k
Forks
1.6k
Avg merge
1d 15h
Merged PRs (30d)
43

Description

Hi,

could you please explain what can be the root cause of the timeout issue in the Redis stack exchange(2.6.86)?
I am using ConnectionMultiplexer to create to connection for Redis.

StackExchange.Redis.RedisTimeoutException: Timeout performing SCAN (5000ms), next: SCAN, inst: 24, qu: 0, qs: 1, aw: False, bw: Inactive, rs: ReadAsync, ws: Idle, in: 0, in-pipe: 0, out-pipe: 0, last-in: 0, cur-in: 0, sync-ops: 233, async-ops: 243, serverEndpoint: 10.247.143.110:6379, conn-sec: 56.39, mc: 1/1/0, mgr: 10 of 10 available, clientName: AX-BLR-2(SE.Redis-v2.6.86.49666), IOCP: (Busy=0,Free=1000,Min=4,Max=1000), WORKER: (Busy=2,Free=32765,Min=4,Max=32767), POOL: (Threads=11,QueuedItems=0,CompletedItems=1589), v: 2.6.86.49666 (Please take a look at this article for some common client-side issues that can cause timeouts: https://stackexchange.github.io/StackExchange.Redis/Timeouts)
   at StackExchange.Redis.CursorEnumerable1.Enumerator.ThrowTimeout(Message message) in /_/src/StackExchange.Redis/CursorEnumerable.cs:line 247    at StackExchange.Redis.CursorEnumerable1.Enumerator.SlowNextSync() in /_/src/StackExchange.Redis/CursorEnumerable.cs:line 193
   at System.Collections.Generic.LargeArrayBuilder1.AddRange(IEnumerable1 items)
   at System.Collections.Generic.EnumerableHelpers.ToArray[T](IEnumerable`1 source)
  

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with src/StackExchange.Redis/CursorEnumerable.cs at lines 193 and 247, then read the linked timeout guidance and the ConnectionMultiplexer usage described in the report. A useful investigation would need to establish a reproducible SCAN timeout and identify the relevant client, server, or workload conditions; the issue is resolved when its root cause and actionable fix are documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, redis
Domain
backend, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.