gpt4 book ai didi

c# - stackexchange.redis 即使在增加超时后也会抛出超时?

转载 作者:IT王子 更新时间:2023-10-29 06:13:24 28 4
gpt4 key购买 nike

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

Timeout performing 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)

更新时我也遇到类似的超时。

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

我尝试更新或删除的 key 大小为 5515 字节。

我也跑了slowlog get命令也没有(长度为0)

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

最佳答案

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 已在最新版本中更新。

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

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: Timeout performing GET MyKey, inst: 2, mgr:
Inactive, queue: 6, qu: 0, qs: 6, qc: 0, wr: 0, wq: 0, in: 0, ar: 0,
IOCP: (Busy=6,Free=994,Min=4,Max=1000), WORKER:
(Busy=3,Free=997,Min=4,Max=1000)

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.

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

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.

关于c# - stackexchange.redis 即使在增加超时后也会抛出超时?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44114824/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com