StackExchange.Redis Get function throws a TimeoutException

…衆ロ難τιáo~ 提交于 2020-06-24 14:39:31

问题


I'm using StackExchange.Redis with C# and the StackExchangeRedisCacheClient.Get function throws the following exception.

myCacheClient.Database.StringGet(txtKey.Text)

'myCacheClient.Database.StringGet(txtKey.Text)' threw an exception of type 'System.TimeoutException' StackExchange.Redis.RedisValue {System.TimeoutException}

Message

"Timeout performing GET hi, inst: 12, mgr: ExecuteSelect, err: never, queue: 2, qu: 2, qs: 0, qc: 0, wr: 0, wq: 1, in: 0, ar: 0, IOCP: (Busy=0,Free=1000,Min=4,Max=1000), WORKER: (Busy=3,Free=4092,Min=4,Max=4095), clientName: ATT-AP-R8-F8WZD" string

Following is the method that I use to retrieve values from the Redis Database.

 protected void btnGetValue_Click(object sender, EventArgs e)
{
    try
    {
        var serializer = new NewtonsoftSerializer();
        var myCacheClient = new StackExchangeRedisCacheClient(serializer);

        var value = myCacheClient.Get<string>(txtKey.Text);
    }
    catch (Exception ex)
    {
        throw ex;
    }
}

All the other functions such as Add, GetInfo & FlushDb are working fine.

来源:https://stackoverflow.com/questions/32220810/stackexchange-redis-get-function-throws-a-timeoutexception

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!