TheCloudlessSky / Harbour.RedisSessionStateStore

A Redis based SessionStateStoreProvider written in C# using ServiceStack.Redis.
MIT License
166 stars 76 forks source link

Exceptions #20

Open ProTip opened 10 years ago

ProTip commented 10 years ago

Hello,

I saw a couple of these on both servers in the cluster yesterday. I believe the exception is coming from the Service Stack client though.. I'm running the Ubuntu Precise packaged Redis v2.2.12; not sure if I should go with a newer version?

Description: The process was terminated due to an unhandled exception.
Exception Info: ServiceStack.Redis.RedisResponseException
Stack:
   at ServiceStack.Redis.RedisNativeClient.CreateResponseError(System.String)
   at ServiceStack.Redis.RedisNativeClient.ReadLong()
   at ServiceStack.Redis.Support.Locking.DistributedLock.Lock(System.String, Int32, Int32, Int64 ByRef, ServiceStack.Redis.IRedisClient)
   at ServiceStack.Redis.Support.Locking.DisposableDistributedLock..ctor(ServiceStack.Redis.IRedisClient, System.String, Int32, Int32)
   at Harbour.RedisSessionStateStore.RedisSessionStateStoreProvider.GetDistributedLock(ServiceStack.Redis.IRedisClient, System.String)
Exception: System.Runtime.Serialization.SerializationException

Message: Type 'ServiceStack.Redis.RedisResponseException' in Assembly 'ServiceStack.Redis, Version=3.9.71.0, Culture=neutral, PublicKeyToken=null' is not marked as serializable.

StackTrace:    at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitSerialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter, SerializationBinder binder)
   at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.Serialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter, SerializationBinder binder)
   at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize(Object graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean fCheck)
   at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph, Header[] headers, Boolean fCheck)
   at System.Runtime.Remoting.Channels.CrossAppDomainSerializer.SerializeObject(Object obj, MemoryStream stm)
   at System.AppDomain.Serialize(Object o)
   at System.AppDomain.MarshalObject(Object o)
Exception Info: ServiceStack.Redis.RedisResponseException
Stack:
   at ServiceStack.Redis.RedisNativeClient.CreateResponseError(System.String)
   at ServiceStack.Redis.RedisNativeClient.ReadLong()
   at ServiceStack.Redis.Support.Locking.DistributedLock.Lock(System.String, Int32, Int32, Int64 ByRef, ServiceStack.Redis.IRedisClient)
   at ServiceStack.Redis.Support.Locking.DisposableDistributedLock..ctor(ServiceStack.Redis.IRedisClient, System.String, Int32, Int32
at Harbour.RedisSessionStateStore.RedisSessionStateStoreProvider.GetDistributedLock(ServiceStack.Redis.IRedisClient, System.String)
   at Harbour.RedisSessionStateStore.RedisSessionStateStoreProvider.GetItem(Boolean, System.Web.HttpContext, System.String, Boolean ByRef, System.TimeSpan ByRef, System.Object ByRef, System.Web.SessionState.SessionStateActions ByRef)
   at Harbour.RedisSessionStateStore.RedisSessionStateStoreProvider.GetItemExclusive(System.Web.HttpContext, System.String, Boolean ByRef, System.TimeSpan ByRef, System.Object ByRef, System.Web.SessionState.SessionStateActions ByRef)
TheCloudlessSky commented 10 years ago

Is the middle one the real exception? It looks like ServiceStack.Redis.RedisResponseException is attempting to be serialized. You're most likely going to have to take this up with ServiceStack because there isn't much I do with it. FYI - I'll be upgrading to StackExchange.Redis for v2, so it should hopefully be more stable.