4

Suddenly we started getting below mentioned Exception when hitting Redis Cache (AWS). It was working fine in the past. We have seen in that Current Connections count for Redis node goes on increasing.

No Connection available" exception while accessing redis. Following is the exception - "No connection is available to service this operation: GET xxxxx; SocketClosed on xxxxx/Interactive, origin: ProcessReadBytes, input-buffer: 0, outstanding: 0, last-read: 69s ago, last-write: 69s ago, unanswered-write: 2630s ago, keep-alive: 60s, pending: 0, state: ConnectedEstablished, in: 0, ar: 0, last-heartbeat: 0s ago, last-mbeat: 0s ago, global: 0s ago: RedisConnectionException at StackExchange.Redis.ConnectionMultiplexer.ExecuteSyncImpl[T](Message message, ResultProcessor1 processor, ServerEndPoint server) in c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\ConnectionMultiplexer.cs:line 2027 at StackExchange.Redis.RedisBase.ExecuteSync[T](Message message, ResultProcessor1 processor, ServerEndPoint server) in c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\RedisBase.cs:line 81 at StackExchange.Redis.RedisDatabase.StringGet(RedisKey key, CommandFlags flags) in c:\code\StackExchange.Redis\StackExchange.Redis\StackExchange\Redis\RedisDatabase.cs:line 1647 at CachingFramework.Redis.Providers.RedisCacheProvider.GetObject[T](String key) at NetCoreUtilities.CachedUserObjectRedis.Get() in /codebuild/output/src803013914/src/NetCoreUtilities/CachedObjects/CachedUserObject.cs:line 63 at NetCoreUtilities.CachedUserObject.GetCachedUserObject(ElasticacheHelper elasticacheHelper, Int64 userID) in /codebuild/output/src803013914/src/NetCoreUtilities/CachedObjects/CachedUserObject.cs:line 82 at GetChildCategoriesAndAssets.Function.FunctionHandler(JObject input, ILambdaContext context) in /codebuild/output/src803013914/src/DIT Framework/users/GetChildCategoriesAndAssets.cs:line 54 at lambda_method(Closure , Stream , Stream , LambdaContextInternal )"

We are using .Net framework 4.5 and StackExchange.Redis 1.2.1, we tried using latest version of StackExchange.Redis, but its seems it does not support .Net framework 4.5.

What should we do without changing current .Net Framework of the Application? Thanks.

Mahesh Waghmare
  • 726
  • 9
  • 27

1 Answers1

0

Yes, Issue has been resolved for now.

There is some issue in old version of Redis which although the timeout set, is not closing the connections.

  1. Upgraded Redis version in AWS console. (Redis5.0)
  2. Updated CachingFramework.Redis version to 11.1.0
  3. Updated StackExchange.Redis library to 2.0.601
  4. Set Timeout value for Parameter Group set back to 0 (Default).

Note: For this, we have updated .Net Framework as well.

Mahesh Waghmare
  • 726
  • 9
  • 27
  • 1
    Actually no this isn't resolved and is an ongoing bug but should be soon. See: https://github.com/StackExchange/StackExchange.Redis/pull/137 – Steve Mar 13 '20 at 12:45