3

I'm getting random exceptions using the ServiceStack.Redis client on an Azure Application Service. Any thoughts?

ServiceStack.Redis 4.5.0 and ServiceStack 4.0.60.0

"ExceptionMessage": "Unknown reply on integer response: 43OK", "StackTrace": " at ServiceStack.Redis.RedisNativeClient.ReadLong()\r\n at ServiceStack.Redis.RedisNativeClient.SendReceive[T](Byte[][] cmdWithBinaryArgs, Func1 fn, Action1 completePipelineFn, Boolean sendWithoutRead)\r\n at ServiceStack.Redis.RedisNativeClient.SendExpectLong(Byte[][] cmdWithBinaryArgs)\r\n at ServiceStack.Redis.RedisNativeClient.Del(Byte[] key)\r\n at ServiceStack.Redis.RedisClient.Remove(String key)\r\n at ServiceStack.ServiceExtensions.RemoveSession(IRequest httpReq, String sessionId)\r\n at ServiceStack.Auth.CredentialsAuthProvider.Authenticate(IServiceBase authService, IAuthSession session, String userName, String password, String referrerUrl)\r\n at ServiceStack.Auth.CredentialsAuthProvider.Authenticate(IServiceBase authService, IAuthSession session, Authenticate request)\r\n at ServiceStack.Auth.AuthenticateService.Authenticate(Authenticate request, String provider, IAuthSession session, IAuthProvider oAuthConfig)\r\n at ServiceStack.Auth.AuthenticateService.Post(Authenticate request)\r\n at lambda_method(Closure , Object , Object )\r\n at ServiceStack.Host.ServiceRunner`1.Execute(IRequest request, Object instance, TRequest requestDto)"

1
  • I managed to solve the issue by using the RedisManagerPool. Commented Sep 13, 2016 at 20:52

1 Answer 1

4

This is typically due to a race condition from sharing the same Redis Client instance across multiple threads. You can share a singleton instance of ServiceStack.Redis Thread-safe Client Managers but you shouldn't share instances of Redis Client across multiple threads.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.