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.
StackExchangeRedisCacheClient? because: that isn't rawStackExchange.Redis; how big is the payload that you are fetching here? (debug object {key}inredis-cliis a fair way of estimating this; look at theserializedlength:{...}field)get foobehave inredis-cli? fast? or slow? also: is it possible that other redis clients on the same node are blocking you? for example, an unrelated app callingkeys {something}? (slowlog getcan be helpful here); likewise, is it possible that this relates to persistence / replication? (the server log can help identify this)qu: 2), with no writer (wr: 0). I have never seen that (at least, not in the production builds for the last ... forever), so frankly: I would have to investigate. This is almost certainly either a bug, or a problem in the initial handshake. I will have to look.