gpt4 book ai didi

c# - StackExchange.Redis.RedisTimeoutException : The timeout was reached before the message could be written to the output buffer, 并且未发送

转载 作者:行者123 更新时间:2023-12-05 05:37:44 28 4
gpt4 key购买 nike

字符串:70036 01:11:34 错误 GetItemFromSessionStore => StackExchange.Redis.RedisTimeoutException:在消息写入输出缓冲区之前达到超时,并且未发送(5000ms, inst=37, qs=37, in=29426, active=EVAL), inst: 37, qs: 37, in: 0, serverEndpoint: Unspecified/***redis.redis.cache.windows.net:6380 ,经理:10 个中有 10 个可用,客户名称:******,IOCP:(忙碌=3,空闲=997,最小=4,最大=1000),WORKER: (Busy=5582,Free=27185,Min=5680,Max=32767), v: 2.0.519.65453(请查看这篇文章,了解一些可能导致超时的常见客户端问题:https://stackexchange.github.io/StackExchange.Redis/Timeouts)在 C:\projects\stackexchange-redis\src\StackExchange.Redis\ConnectionMultiplexer.cs:2175 行在 C:\projects\stackexchange-redis\src\StackExchange.Redis\RedisBase.cs 中的 StackExchange.Redis.RedisBase.ExecuteSync[T](消息消息,ResultProcessor1 处理器,ServerEndPoint 服务器):第 54 行在 C:\projects\stackexchange-redis\src\StackExchange.Redis\RedisDatabase.cs:line 1134

当我们收到大量请求时,我们会遇到很多这样的错误。当记录超时异常时,我们确实有 CPU 和非常高的线程数。

根据文档,

qsQueue-Awaiting-Response : {int}当前有 x 个操作正在等待 redis 服务器的回复。

inInbound-Bytes : {long}有x个字节等待从redis的输入流中读取

Redis 服务器似乎能够很好地处理负载。那么有人可以解释错误的含义吗?

最佳答案

是的,可能是线程饥饿。您可以设置最小阈值,这样它就不会用完线程。基本理论是操作系统必须等待,比如 500 毫秒,才能在达到最小阈值后启动另一个线程。

ThreadPool.SetMinThreads(minWorker, minIoc)

https://learn.microsoft.com/en-us/dotnet/api/system.threading.threadpool.setminthreads?view=net-6.0

关于c# - StackExchange.Redis.RedisTimeoutException : The timeout was reached before the message could be written to the output buffer, 并且未发送,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/73073677/

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