StackExchange / StackExchange.Redis

General purpose redis client
https://stackexchange.github.io/StackExchange.Redis/
Other
5.84k stars 1.5k forks source link

StackExchange.Redis.RedisTimeoutException #2705

Open Seamless2014 opened 2 months ago

Seamless2014 commented 2 months ago

I have encountered this timeout issue using StackExchange.Redis . this is the timeout exception When the data volume is relatively large: StackExchange.Redis.RedisTimeoutException: The message timed out in the backlog attempting to send because no connection became available, command=GET, timeout: 15000, inst: 13, qu: 531, qs: 0, aw: False, bw: CheckingForTimeout, rs: ComputeResult, ws: Idle, in: 0, in-pipe: 1261, out-pipe: 0, last-in: 0, cur-in: 23, sync-ops: 0, async-ops: 4655, serverEndpoint: services.zkgt.com:6379, conn-sec: 0.09, aoc: 0, mc: 1/1/0, mgr: 10 of 10 available, clientName: WIN-QNICAM20MQQ(SE.Redis-v2.7.33.41805), IOCP: (Busy=1,Free=999,Min=300,Max=1000), WORKER: (Busy=43,Free=32724,Min=300,Max=32767), POOL: (Threads=244,QueuedItems=0,CompletedItems=897557,Timers=207), 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)

Thanks

Seamless2014 commented 2 months ago

ConfigurationOptions RedisConn:allowadmin=true,ConnectTimeout=15000,SyncTimeout=15000,abortConnect=false, I dot not know if the setting time is too long cause the problem.

Seamless2014 commented 2 months ago

ThreadPool.SetMinThreads(300, 300); set min threads

GurcanBicer commented 1 month ago

I have the exact problem. The thread pool set to max, whenever the issue happens the free thread count is like 998-996... When it happens, the OPC.UA client also fails and keep alive fails. If I disable redis operations everything is good. I don't have any proves but it feels like library creates a deadlock on TCP layer.