1

以下给了我一个超时异常。ListLengthListRange命令工作得很好。

public static Lazy<ConnectionMultiplexer> lazyConnection = new Lazy<ConnectionMultiplexer>(() =>
    {
        string connStr = ConfigurationManager.AppSettings["AzureRedisConnectionString"].ToString();
        return ConnectionMultiplexer.Connect(connStr);
    });

public static ConnectionMultiplexer Connection
{
    get
    {
        return lazyConnection.Value;
    }
}

public static IDatabase RedisDb
{
    get
    {
        return Connection.GetDatabase();
    }
}

db.ListTrim("MyKeyName", 0, 4);

例外是:

超时执行 LTRIM MyKeyName, inst: 0, mgr: ExecuteSelect, err: never, queue: 1, qu: 1, qs: 0, qc: 0, wr: 0, wq: 1, in: 0, ar: 0, IOCP : (Busy=0,Free=1000,Min=4,Max=1000), WORKER: (Busy=1,Free=1022,Min=4,Max=1023), clientName: HS-PC at StackExchange.Redis.ConnectionMultiplexer .ExecuteSyncImpl[T](消息消息,ResultProcessor 1 processor, ServerEndPoint server) in c:\TeamCity\buildAgent\work\3ae0647004edff78\StackExchange.Redis\StackExchange\Redis\ConnectionMultiplexer.cs:line 1927 at StackExchange.Redis.RedisBase.ExecuteSync[T](Message message, ResultProcessor1 处理器,ServerEndPoint 服务器)在 c:\TeamCity\buildAgent\work\3ae0647004edff78\StackExchange.Redis\StackExchange\Redis\RedisBase.cs:第 80 行,位于 StackExchange.Redis.RedisDatabase.ListTrim (RedisKey 键、Int64 启动、Int64 停止、CommandFlags 标志)在 c:\TeamCity\buildAgent\work\3ae0647004edff78\StackExchange.Redis\StackExchange\Redis\RedisDatabase.cs:line 796} System.SystemException {System.TimeoutException}

4

0 回答 0