加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

c# – 错误:使用Redis执行GET超时

发布时间:2020-12-15 21:07:23 所属栏目:百科 来源:网络整理
导读:我在Redis缓存中有200,000个用户的列表. 当我尝试使用StackExchange.Redis StringGet从Redis缓存中获取该列表时,我收到TimeOut错误: “Timeout performing GET,inst: 1,mgr: ExecuteSelect,err: never,queue: 2,qu: 0,qs: 2,qc: 0,wr: 0,wq: 0,in: 8596,ar:
我在Redis缓存中有200,000个用户的列表.

当我尝试使用StackExchange.Redis StringGet从Redis缓存中获取该列表时,我收到TimeOut错误:

“Timeout performing GET,inst: 1,mgr: ExecuteSelect,err: never,queue: 2,qu: 0,qs: 2,qc: 0,wr: 0,wq: 0,in: 8596,ar: 0,IOCP: (Busy=0,Free=1000,Min=2,Max=1000),WORKER: (Busy=0,Free=4095,Max=4095),clientName: WIN-XYZ”

有人可以解释这些值表示什么:忙,免费,最小和最大?

我已经通过构造函数中的更大程度增加了超时:

redis = ConnectionMultiplexer.Connect(string.Format("{0},allowAdmin=true,connectTimeout=1500000,keepAlive=100",redisConfig));

但是每次我获取用户列表时,我仍然会收到超时.

这不是GET的问题,只是在设置该列表时遇到问题:

Timeout performing PSETEX,err:
never,wr: 1,wq: 1,in: 0,
IOCP: (Busy=0,WORKER:
(Busy=0,Free=8191,Max=8191),clientName: WIN-XYZ

在:

db.StringSet(cacheKey,bytes,slidingExpiration);

我甚至试图提出这里提到的各种超时https://stackexchange.github.io/StackExchange.Redis/Configuration:

redis = ConnectionMultiplexer.Connect(string.Format("{0},syncTimeout=600000,connectRetry=3,connectTimeout=600000,keepAlive=180",redisConfig));
                redis.PreserveAsyncOrder = false;

但我仍然收到以下错误:

Timeout performing GET,inst: 0,
queue: 0,qs: 0,IOCP:
(Busy=0,WORKER:
(Busy=2,Free=4093,clientName: WIN-XYZ

解决方法

在我的情况下,我重新启动服务器并且它工作,问题是服务器CPU是100%,当用户试图从redis获取凭据时,无法访问,所以…… TIMEOUT并从会话中踢出带有漂亮的错误信息.小心你的进程,也许其中一个是杀死CPU,如果发生这种情况,我可以肯定,Redis会超时.

我的错误信息:

Error Message: Timeout performing GET session_user@gmail.com,mgr: 
 Inactive,queue: 5,qs: 5,in: 990,clientName: RD0003FXXXXF5D,serverEndpoint: 
 Unspecified/cr.redis.cache.windows.net:6380,keyHashSlot: 14356,IOCP: 
 (Busy=0,WORKER: (Busy=10,Free=8181,Max=8191) (Please take a look at this article for some common client-side issues that can cause 
 timeouts: http://stackexchange.github.io/StackExchange.Redis/Timeouts)

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读