I am trying to write records from a dictionary with around 5000 records to a Redis cache. But sometimes I get the below exception, I have no clue why I am getting this error, I have checked on the internet but could not find any solution or root cause of this issue.
using (ConnectionMultiplexer redis = ConnectionMultiplexer.Connect(_configuration.GetConnectionString("redis_server")))
{
IDatabase db = redis.GetDatabase();
foreach (KeyValuePair<string, string> keyValuePair in _dictAllData)
{
db.StringSet(keyValuePair.Key, keyValuePair.Value, TimeSpan.FromMinutes(30));
}
}
Exception
No connection is available to service this operation: SETEX 747712; IOCP: (Busy=0,Free=1000,Min=4,Max=1000), WORKER: (Busy=0,Free=32767,Min=4,Max=32767), Local-CPU: n/a
Edit:
StackExchange.Redis version: 2.0.601