Tag: azure redis cache

Stackexchange.Redis超时和socketfailures

我使用Azure Redis(使用Stackexchange.Redis)作为缓存存储,它通常工作正常。 但是我偶尔会遇到超时错误,我无法确定它为什么会发生。 我的redis连接设置: value=”dev.redis.cache.windows.net,ssl=true,password=secret,abortConnect=false,syncTimeout=3000″ 我在同一秒(多次调用)中得到所有这些exception:[我在GET操作上也得到了这些。 几乎所有这些exception都在StringSet和StringGet上。 我很少在HashSets或HashGets上获得例外] Timeout performing SET {key}, inst: 1, mgr: ExecuteSelect, queue: 6, qu=0, qs=6, qc=0, wr=0/0, in=0/0 SocketFailure on SET SocketFailure on SET No connection is available to service this operation: SET 我猜测设置对象花费的时间比预期的要长,这可能是由于对象很大所以我可能会增加同步时间,但这会隐藏其他一些问题吗? 我只是在对stackexchange.redis的同步调用中得到这些exception,当调用异步时我没有看到exception。 堆栈跟踪: StackExchange.Redis.RedisConnectionException: SocketFailure on SET at StackExchange.Redis.ConnectionMultiplexer.ExecuteSyncImpl[T](Message message, ResultProcessor`1 processor, ServerEndPoint server) i at StackExchange.Redis.RedisBase.ExecuteSync[T](Message […]

Azure Redis缓存 – ConnectionMultiplexer对象池

我们在我们的应用程序中使用C1 Azure Redis Cache。 最近我们在GET操作上遇到了很多时间。 根据这篇文章 ,可能的解决方案之一是实现ConnectionMultiplexer对象池。 另一种可能的解决方案是在客户端中使用ConnectionMultiplexer对象池,并在发送新请求时选择“负载最小”的ConnectionMultiplexer。 这应该可以防止单个超时导致其他请求也超时。 如何使用C#实现一个ConnectionMultiplexer对象池? 编辑: 我最近问的相关问题。

无法连接到redis服务器; 创建断开连接的多路复用器

我有以下代码连接到azure redis缓存。 public class CacheConnectionHelper { private static Lazy lazyConnection = new Lazy(() => { return ConnectionMultiplexer.Connect(SettingsHelper.AzureRedisCache); }); public static ConnectionMultiplexer Connection { get { return lazyConnection.Value; } } } 我这样用它 public static List GetModules() { IDatabase cache = CacheConnectionHelper.Connection.GetDatabase(); List listOfModules = new List(); listOfModules = (List)cache.Get(“ApplicationModules”); if (listOfModules == null) { listOfModules = […]