StackExchange.Redis.RedisTimeoutException: Timeout awaiting response (outbound=0KiB, inbound=4KiB, 6000ms elapsed, timeout is 3000ms), command=EXISTS, next: GET mykey, inst: 0, qu: 0, qs: 0, aw: True, bw: SpinningDown, rs: ReadAsync, ws: Writing, in: 993, last-in: 1, cur-in: 0, sync-ops: 37097, async-ops: 170733, serverEndpoint: XXXXXXXX, conn-sec: 5412.93, aoc: 1, mc: 1/1/0, mgr: 10 of 10 available, clientName: XXXXXXXXX, PerfCounterHelperkeyHashSlot: 7906, IOCP: (Busy=0,Free=1000,Min=1,Max=1000), WORKER: (Busy=28,Free=32739,Min=2,Max=32767), POOL: (Threads=28,QueuedItems=1715,CompletedItems=1310821,Timers=80), v: 2.6.122.38350 (Please take a look at this article for some common client-side issues that can cause timeouts: https://stackexchange.github.io/StackExchange.Redis/Timeouts)
Could you please answer the following questions
- Why do I have sync-ops when I am not using sync functions anywhere in the code. I use the update and get as follows (asynchronous functions)-
private AsyncPolicyWrap GetPolicy()
{
return Policy.WrapAsync(redisConnectionRetryPolicy, customRetryPolicy ?? defaultRedisTimeoutPolicy);
}
public async Task<RedisValue> StringGetAsync(RedisKey key)
{
return await GetPolicy().ExecuteAsync(() => redis.StringGetAsync(key));
}
I am also using redLock to acquire the lock.
- I intend to use
ThreadPool.SetMinThreads(10, minIOC)to change the number of minimum number of worker threads. I am using FARGATE ecs tasks- there are 4 tasks each with 2vCPUs and 16 GB RAM. And based on the behaviour, I intend to modify the value. Please let me know if I am missing anything here.