Skip to content

Redis Cache exception StackExchange.Redis.ConnectionMultiplexer.ExecuteSyncImpl #1285

@bhosalemahesh899

Description

@bhosalemahesh899

I am using Azure Redis Cache, And I am getting following exception for StackExchange Redis cache on dev environment, On local, it is working fine. I am using StackExchange.Redis version 1.2.6. I have tried following config options but still is there is no success.

Redis connection `

Expiry = new TimeSpan(1000000);
string cacheConnectionString = "";//redis cache connection string
var configOptions = ConfigurationOptions.Parse(cacheConnectionString);
configOptions.SyncTimeout = 5000;
configOptions.ResponseTimeout = 5000;
configOptions.ConnectTimeout = 50000;
configOptions.ConnectRetry = 5;
configOptions.AbortOnConnectFail = false;

lazyConnection = new Lazy<ConnectionMultiplexer>(() =>
{
  return ConnectionMultiplexer.Connect(configOptions);
});

cache = lazyConnection.Value.GetDatabase();'

I am getting the following exception.
StackExchange.Redis.RedisConnectionException: SocketClosed on GET
at StackExchange.Redis.ConnectionMultiplexer.ExecuteSyncImpl[T](Message message, ResultProcessor1 processor, ServerEndPoint server) at
StackExchange.Redis.RedisBase.ExecuteSync[T](Message message,
ResultProcessor1 processor, ServerEndPoint server) at StackExchange.Redis.RedisDatabase.StringGet(RedisKey key, CommandFlags flags) at Decos.Fixi.Data.CacheServices.BaseCacheService.Get[T](String key) in E:_work3\6\s\Fixi2\Main\Decos.Fixi.Api\Decos.Fixi.Data\CacheServices\BaseCacheService.cs:line 73 at Decos.Fixi.Data.CacheServices.UserCacheService.GetValue(String userId, Get getFromDatabase, Boolean toGetFromDatabase) in E:_work3\6\s\Fixi2\Main\Decos.Fixi.Api\Decos.Fixi.Data\CacheServices\UserCacheService.cs:line 37 at Decos.Fixi.Data.Services.UserService.GetUserAsync(Nullable1
decosUserID, String googleUserID, String facebookUserID, Nullable1 azureADObjectId, Boolean toGetFromDatabase) in E:_work3\6\s\Fixi2\Main\Decos.Fixi.Api\Decos.Fixi.Data\Services\UserService.cs:line 96 at Decos.Fixi.WebApi.Annotations.AuthenticateApplicationAttribute.GetUserAsync(HttpRequestMessage requestMessage, IUserProvider userProvider) in E:_work3\6\s\Fixi2\Main\Decos.Fixi.Api\Decos.Fixi.WebApi\Annotations\ApplicationAuthenticationAttribute.cs:line 188 at Decos.Fixi.WebApi.Annotations.AuthenticateApplicationAttribute.d__14.MoveNext() in E:_work3\6\s\Fixi2\Main\Decos.Fixi.Api\Decos.Fixi.WebApi\Annotations\ApplicationAuthenticationAttribute.cs:line 0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Decos.Fixi.WebApi.Annotations.AuthenticateApplicationAttribute.d__15.MoveNext() in E:_work3\6\s\Fixi2\Main\Decos.Fixi.Api\Decos.Fixi.WebApi\Annotations\ApplicationAuthenticationAttribute.cs:line 179 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Decos.Fixi.WebApi.Annotations.AuthenticateApplicationAttribute.d__7.MoveNext() in E:_work3\6\s\Fixi2\Main\Decos.Fixi.Api\Decos.Fixi.WebApi\Annotations\ApplicationAuthenticationAttribute.cs:line 95 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Controllers.AuthenticationFilterResult.d__0.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Controllers.ExceptionFilterResult.d__0.MoveNext()",80000b3a-0000-e500-b63f-84710c7967bb

Thanks in advance!
Mahesh Bhosale

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions