即使在增加超时后,stackexchange.redis 也会引发超时? [英] stackexchange.redis throws timeout even after increasing timeout?

查看:126
本文介绍了即使在增加超时后,stackexchange.redis 也会引发超时?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试从缓存中删除时出现以下错误:

I am getting the following error when trying to delete from my cache:

超时执行 DEL test.com, inst: 0, mgr: ExecuteSelect, err: never, queue: 0, qu: 0, qs: 0, qc: 0, wr: 0, wq: 0, in: 0, ar: 0, clientName: ORLWS052, serverEndpoint: Unspecified/pub-redis-16778.us-west-2-1.1.ec2.garantiadata.com:16778, keyHashSlot: 6928, IOCP: (Busy=3,Free=997,Min=4,Max=1000), WORKER: (Busy=4,Free=4091,Min=4,Max=4095), Local-CPU: 100% (一些常见的客户端请看这篇文章-可能导致超时的附带问题:https://github.com/StackExchange/StackExchange.Redis/tree/master/Docs/Timeouts.md)

我在更新时也遇到类似的超时.

I also get an similar timeout when updating.

我不知道如何阅读这篇文章,所以如果有人知道这会有所帮助.

I have no idea how to read this, so if anyone knows that would be helpful.

我尝试更新或删除的密钥大小为 5515 字节.

The size of the key I am trying to update or delete is 5515 bytes.

我也运行了 slowlog get 命令,没有(长度为 0)

I also ran the slowlog get command and there is none (the length is 0)

我也尝试过增加超时时间,但也没有用

I also tried to increase the timeout, but that didn't work either

推荐答案

IOCP: (Busy=3,Free=997,Min=4,Max=1000), WORKER: (Busy=4,Free=4091,Min=4,Max=4095),本地 CPU:100%

请检查您的 ICOP、WORKER 繁忙线程和最小线程.CPU也是100%.最新版本中更新了 timeoutHelpLink.

Please check your ICOP, WORKER busy threads and minimum threads. Also the CPU is 100%. The timeoutHelpLink was updated in the latest release.

https://stackexchange.github.io/StackExchange.Redis/Timeouts

如果我们查看来自 StackExchange.Redis 的示例错误消息(构建1.0.450 或更高版本),您将看到它现在打印 ThreadPool 统计信息(请参阅下面的 IOCP 和 WORKER 详细信息).

If we look at an example error message from StackExchange.Redis (build 1.0.450 or later), you will see that it now prints ThreadPool statistics (see IOCP and WORKER details below).

System.TimeoutException: 超时执行 GET MyKey, inst: 2, mgr:不活动,队列:6,qu:0,qs:6,qc:0,wr:0,wq:0,in:0,ar:0,IOCP:(忙碌=6,空闲=994,最小值=4,最大值=1000),工人:(忙=3,空闲=997,最小=4,最大=1000)

在上面的例子中,你可以看到 IOCP 线程有 6 个繁忙的线程,并且系统配置为允许最少 4 个线程.在这种情况下,客户端可能会看到两个 500 毫秒的延迟因为 6 > 4.

In the above example, you can see that for IOCP thread there are 6 busy threads and the system is configured to allow 4 minimum threads. In this case, the client would have likely seen two 500 ms delays because 6 > 4.

请注意 StackExchange.Redis 可能会在任何一个增长时超时IOCP 或 WORKER 线程受到限制.

Note that StackExchange.Redis can hit timeouts if growth of either IOCP or WORKER threads gets throttled.

建议:鉴于以上信息,建议设置IOCP 和 WORKER 线程的最小配置值大于默认值.我们不能一刀切关于这个值应该是什么的指导,因为一个人的正确值另一个应用程序的应用程序将太高/太低.这个设置还可以影响复杂的其他部分的性能应用程序,因此您需要将此设置微调到您的特定需要.一个好的起点是 200 或 300,然后测试和调整为需要.

Recommendation: Given the above information, it's recommend to set the minimum configuration value for IOCP and WORKER threads to something larger than the default value. We can't give one-size-fits-all guidance on what this value should be because the right value for one application will be too high/low for another application. This setting can also impact the performance of other parts of complicated applications, so you need to fine-tune this setting to your specific needs. A good starting place is 200 or 300, then test and tweak as needed.

这篇关于即使在增加超时后,stackexchange.redis 也会引发超时?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆