[C#] CacheManager에 Redis Server 풀 크기를 설정하는 방법은 무엇입니까?CacheManager에서 Redis Server 풀 크기를 설정하는 방법은 무엇입니까?
높은 동시성으로 오류가 발생했습니다.이 작업을 서비스 할 수있는 연결이 없습니다 : HMGET, 연결 풀 크기를 설정하는 방법?
No connection is available to service this operation: HMGET U
at StackExchange.Redis.ConnectionMultiplexer.ExecuteSyncImpl[T](Message message, ResultProcessor`1 processor, ServerEndPoint server)
at StackExchange.Redis.RedisBase.ExecuteSync[T](Message message, ResultProcessor`1 processor, ServerEndPoint server)
at StackExchange.Redis.RedisDatabase.HashGet(RedisKey key, RedisValue[] hashFields, CommandFlags flags)
at CacheManager.Redis.RedisCacheHandle`1.<>c__DisplayClass25_0.<GetCacheItemInternal>b__0()
at CacheManager.Redis.RetryHelper.Retry[T](Func`1 retryme, Int32 timeOut, Int32 retries)
at CacheManager.Redis.RedisCacheHandle`1.Retry[T](Func`1 retryme)
at CacheManager.Redis.RedisCacheHandle`1.GetCacheItemInternal(String key, String region)
at CacheManager.Redis.RedisCacheHandle`1.GetCacheItemInternal(String key)
at CacheManager.Core.Internal.BaseCache`1.GetCacheItem(String key)
at CacheManager.Core.BaseCacheManager`1.GetCacheItemInternal(String key, String region)
at CacheManager.Core.BaseCacheManager`1.GetCacheItemInternal(String key)
at CacheManager.Core.Internal.BaseCache`1.GetCacheItem(String key)
at CacheManager.Core.Internal.BaseCache`1.Get(String key)
at CacheManager.Core.Internal.BaseCache`1.Get[TOut](String key)
======================= Stackexchange.Redis 연결 풀링을 사용하지 않는
var cache = CacheFactory.Build("RuntimeCache", settings =>
{
settings.WithSystemRuntimeCacheHandle("RuntimeCache")
.WithExpiration(ExpirationMode.Sliding, TimeSpan.FromMinutes(10))
.And
.WithRedisConfiguration("RedisCache", config =>
{
config.WithAllowAdmin()
.WithDatabase(1)
.WithPassword(password)
.WithEndpoint(host, port);
})
.WithMaxRetries(100)
.WithRetryTimeout(50)
.WithRedisBackPlate("RedisCache")
.WithRedisCacheHandle("RedisCache", true)
.WithExpiration(ExpirationMode.Sliding, TimeSpan.FromMinutes(30));
});