StackExchange.Redis icon indicating copy to clipboard operation
StackExchange.Redis copied to clipboard

StackExchange.Redis.RedisTimeoutException: The message timed out in the backlog attempting to send because no connection became available

Open jejass opened this issue 1 year ago • 2 comments
trafficstars

Hello there,

StackExchange is used to connect to Redis. and see this error message.

StackExchange.Redis.RedisTimeoutException: The message timed out in the backlog attempting to send because no connection became available, command=GET, timeout: 5000, outbound: 72KiB, inbound: 0KiB, inst: 0, qu: 7, qs: 0, aw: False, bw: CheckingForTimeout, rs: ReadAsync, ws: Idle, in: 0, last-in: 28, cur-in: 0, sync-ops: 4, async-ops: 32769357, serverEndpoint: xxx:xxx, conn-sec: 22760.71, aoc: 0, mc: 1/1/0, mgr: 10 of 10 available, clientName: xxx(SE.Redis-v2.7.20.59961), IOCP: (Busy=0,Free=1000,Min=200,Max=1000), WORKER: (Busy=37,Free=32730,Min=200,Max=32767), POOL: (Threads=47,QueuedItems=4,CompletedItems=924777304,Timers=32), v: 2.7.20.59961 (Please take a look at this article for some common client-side issues that can cause timeouts: https://stackexchange.github.io/StackExchange.Redis/Timeouts)

after restarting client machine, the issue was gone.

please check the root cause and confirm if there is any configuration need to improved in client side.

jejass avatar Sep 04 '24 06:09 jejass

"bw: CheckingForTimeout" indicates that StackExchange.Redis lost its connection to the Redis server so it started backlogging commands, waiting for the connection to be restored. While there are commands waiting in the backlog, SE.Redis periodically scans them checking to see if the timeout has elapsed for any commands. Ideally the connection is restored and backlogged commands are executed before any time out, but in this case the connection was not restored within the 5000ms timeout. To find the root cause, you'll need to find out why the connection to Redis was lost and not restored quickly.

philon-msft avatar Sep 04 '24 15:09 philon-msft

"An error occured: The message timed out in the backlog attempting to send because no connection became available (5000ms) - Last Connection Exception: It was not possible to connect to the redis server(s). ConnectTimeout, command=EXISTS, timeout: 5000, inst: 0, qu: 0, qs: 0, aw: False, bw: CheckingForTimeout, rs: NotStarted, ws: Idle, in: 0, last-in: 0, cur-in: 0, sync-ops: 0, async-ops: 12, serverEndpoint: 172.28.251.73:6379, conn-sec: n/a, aoc: 0, mc: 1/1/0, mgr: 10 of 10 available, clientName: UTBMAPT2(SE.Redis-v2.7.33.41805), IOCP: (Busy=0,Free=1000,Min=1,Max=1000), WORKER: (Busy=1,Free=32766,Min=4,Max=32767), POOL: (Threads=5,QueuedItems=0,CompletedItems=16638,Timers=8), v: 2.7.33.41805 (Please take a look at this article for some common client-side issues that can cause timeouts: https://stackexchange.github.io/StackExchange.Redis/Timeouts)

Sorry, has this problem been solved? I am a beginner in Redis. The current situation I am encountering is that when I publish to IIS, I will close the application pool, but the above error will appear, but when I restore the pool, it will be fine. , so I’m not sure what the problem is. It feels weird and I don’t know how to start.

I was wondering if this problem occurred because someone was still trading and I interrupted it.

a35506322 avatar Dec 09 '24 10:12 a35506322