0

I have a .net 6.0 API that connects to Azure Redis cache with no errors from my local box, however, on AKS, the deployed container is giving me the timeout below. Any help is greatly appreciated.

StackExchange.Redis.RedisTimeoutException: The timeout was reached before the message could be written to the output buffer, and it was not sent, command=EVAL, timeout: 
    5000, inst: 0, qu: 0, qs: 10, aw: False, bw: CheckingForTimeout, rs: ReadAsync, ws: Idle, in: 0, in-pipe: 0, out-pipe: 0, 
    serverEndpoint: my-app-redis-cache.redis.cache.windows.net:6380, mc: 1/1/0, mgr: 10 of 10 available, clientName: 
    api-rtw(SE.Redis-v2.6.70.49541), IOCP: (Busy=0,Free=1000,Min=1,Max=1000), WORKER: (Busy=0,Free=32767,Min=1,Max=32767), POOL: (Threads=3,QueuedItems=0,CompletedItems=34150), 
    v: 2.6.70.49541 (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.RedisDatabase.ScriptEvaluateAsync(String script, RedisKey[] keys, RedisValue[] values, CommandFlags flags) 
    in /_/src/StackExchange.Redis/RedisDatabase.cs:line 1550   
    at Microsoft.Extensions.Caching.StackExchangeRedis.RedisCache.
    SetAsync(String key, Byte[] value, DistributedCacheEntryOptions options, CancellationToken token)   
  • This is difficult to know exactly what the issue is,you can find few reference documents which can help 1. Increasing the number of threads: https://learn.microsoft.com/en-us/dotnet/api/system.threading.threadpool.setminthreads?view=net-6.0 2. Checking the ssl configuration: https://github.com/StackExchange/StackExchange.Redis/issues/2046 you can also review the article mentioned in the error itself: https://stackexchange.github.io/StackExchange.Redis/Timeouts – GeethaThatipatri-MSFT Oct 26 '22 at 14:40
  • 1
    Thank you, @GeethaThatipatri-MSFT. The issue was in the host application thread blocking. – user1596914 Nov 13 '22 at 01:32

0 Answers0