CachingFramework.Redis
CachingFramework.Redis copied to clipboard
Timeout on small list
Hi, this may or may not be an issue with the library. I'm trying to create a large list (over 100k items). Even though I have a vary large Azure Redis instance (25 gigs), the time to insert items into a list is very very long. When retrieving items from the list, I get timeout errors. I even stopped inserting at 30 items or so just to see it work all the way through.
I'm using the strongly typed list mechanism. I have an object of an unknown type so I'm inserting like this:
IRedisList<object> list = CacheUtility.RedisContext.Collections.GetRedisList<object>(key);
var enumerator = ((IEnumerable)InvokedMethodDataResult).GetEnumerator();
while (enumerator.MoveNext())
{
var listItemType = enumerator.Current.GetType();
list.Add(enumerator.Current);
}
To retrieve (trying to convert to List
var cacheList = CacheUtility.RedisContext.Collections.GetRedisList<object>(key);
var objectList = new List<object>();
objectList.AddRange(cacheList.GetRange(0, -1)); <---- time out, 36 items in list, 5000 ms timeout conn string
return objectList;
Error:
Timeout performing LRANGE (5000ms), next: LRANGE XXXXX, inst: 0, qu: 0, qs: 1, aw: False, rs: ReadAsync, ws: Idle, in: 0, serverEndpoint:XXXXXXX, mc: 1/1/0, mgr: 10 of 10 available, clientName: XXXX, IOCP: (Busy=0,Free=1000,Min=4,Max=1000), WORKER: (Busy=2,Free=8189,Min=4,Max=8191), v: 2.2.4.27433 (Please take a look at this article for some common client-side issues that can cause timeouts: https://stackexchange.github.io/StackExchange.Redis/Timeouts)
Also, I've tried SetObject and GetObject with a list. I can get around 20k items in GerObject before it times out. Trying to get 150k objects. I've tried multithreading, but that also times out. Any advice?