简体   繁体   中英

TimeoutException exception in StackExchange Redis .NET Library

We are using stackexchange.redis.dll but recently I am seeing lots of below exception in log. Any idea what's getting wrong?

TimeoutException exception: Timeout performing EXISTS key1234, inst: 1, mgr: Inactive, err: never, queue: 10, qu: 0, qs: 10, qc: 0, wr: 0, wq: 0, in: 2304, ar: 0, IOCP: (Busy=4,Free=996,Min=4,Max=1000), WORKER: (Busy=15,Free=4080,Min=4,Max=4095), clientName: testclient

Info:

due to some requirement, I am fetching all existing keys from Redis cache by saying connectioncontext.Server("host").Keys() and in Redis document somewhere I saw that, fetching keys frequently can lead to decreasing cache performance. But I am fetching the keys only 4 times / day (I mean in application). Will that cause any issue at all?

Please let me know.

Timeout performing SET {Key}, inst: 0, mgr: Inactive, queue: 2, qu=1, qs=1, qc=0, wr=1/1, in=0/0 means, it has sent one request (qs), there is another request that's in unsent queue (qu), while there is nothing to be read from the network. there is an active writer meaning the one unsent is not being ignored. Basically, there is a request sent and waiting for the response to be back.

I fixed it doing the following: I set the connection timeout to 30 seconds,

ConnectTimeout = 30000, // 30 seconds
SyncTimeout = 20000, // 20 seconds 
ConnectRetry = 3

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM