Azure Redis超时,具有多个Azure webapp实例

时间:2018-03-25 22:46:32

标签: azure redis azure-web-sites stackexchange.redis azure-redis-cache

我正在使用StackExchange的Redis客户端来读取和写入Azure Cache(C2)的数据。在负载测试期间,如果我使用webapp的一个实例,则redis表现良好而没有任何错误。但是,如果我设置webapp的多个实例(尝试使用和不使用自动缩放的5个实例),我会收到以下错误

Timeout performing GET {key}, inst: 2, mgr: Inactive, err: never, queue: 0, qu: 0, qs: 0, qc: 0, wr: 0, wq: 0, in: 0, ar: 0, clientName: {client}, serverEndpoint: Unspecified/{redis_server}, keyHashSlot: 13746, IOCP: (Busy=1,Free=999,Min=4,Max=1000), WORKER: (Busy=26,Free=32741,Min=4,Max=32767) (Please take a look at this article for some common client-side issues that can cause timeouts: http://stackexchange.github.io/StackExchange.Redis/Timeouts)

我尝试增加IOCPWORKER以及MVC项目,该项目确实显示了正确的Min值,但仍然给出错误。

使用增加的线程查看日志,如下所示

Timeout performing GET {key}, inst: 6, mgr: Inactive, err: never, queue: 1, qu: 0, qs: 1, qc: 0, wr: 0, wq: 0, in: 0, ar: 0, clientName: {client}, serverEndpoint: Unspecified/{redis_server}, keyHashSlot: 13746, IOCP: (Busy=2,Free=998,Min=100,Max=1000), WORKER: (Busy=84,Free=32683,Min=200,Max=32767) (Please take a look at this article for some common client-side issues that can cause timeouts: http://stackexchange.github.io/StackExchange.Redis/Timeouts)

任何可能导致此问题的建议?

1 个答案:

答案 0 :(得分:0)

[被修改]

第一个错误表明对ThreadPool的更改没有生效。但是,您最近发布的更新错误消息表明它们已经生效,因此这很好。

现在你已经解决了这个问题,可能会有其他问题导致持续超时。我在这里记录了最常见的原因:

Client Side Issues

Server Side Issues

我看到的其他常见问题之一是客户端CPU达到100%。您必须小心查看MAX CPU而不是AVG CPU,因为AVG CPU可能低于100%而MAX仍然达到100%。每当CPU达到100%时,您就会失去计算能力,并且处理服务器发送的响应会有延迟(即使服务器响应非常快)。