1

The question says it all..

We have been running it for 10 hrs when we suddenly hit this. I had to recycle IIS to recover from this..

Here is the stack trace.. System.NullReferenceException: Object reference not set to an instance of an object. at ServiceStack.Redis.RedisClient.AsT at XXX.Cache.Providers.Redis.RedisCachedCollection2.GetCollection(IRedisClient redis) at XXX.Cache.Providers.Redis.RedisCachedCollection2.GetEnumerator() at System.Linq.Enumerable.WhereEnumerableIterator1.MoveNext() at System.Linq.Buffer1..ctor(IEnumerable1 source) at System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source)

Here is the GetCollection method..

private IRedisHash<TKey, TValue> GetCollection(IRedisClient redis)
        {
            _redisTypedClient = redis.As<TValue>();
            return _redisTypedClient.GetHash<TKey>(_collectionKey);
        }
rb531
  • 43
  • 1
  • 5
  • Is there a second exception saying the connection is lost? – jeffgabhart Jan 08 '15 at 20:04
  • Looks like the `redis` instance passed to the method be `null`? I'd add a guard to verify it's not null to ensure that's not the issue. – mythz Jan 08 '15 at 21:40
  • I have added retry from now, found that most the issues I have been seeing so far are due to some unknown intermittent failures on redis or from network. I have added retries to all of my calls and seem to be behaving much better. – rb531 Jan 09 '15 at 23:21
  • As a follow up, how we recover from a redis lock if the IIS got reset or crashed. As a side affect of troubleshooting this, i found one my collections have been locked and all locking calls were timing out. I had to using redis-cli to flush db and let the cache rebuild. – rb531 Jan 09 '15 at 23:23

0 Answers0