Reputation: 1072
I'have asp net v4.6.1 with StackExchange.Redis v2.0.61 and since the implementaiton of redis , i have always same errors in randomly way, here is some logs from errors if anyone can help , i followed the official documentation / microsoft forums that give steps that help reduce number of errors and changing threadpool.
Timeout performing GET (2000ms), next: GET key, inst: 0, qu: 0, qs: 9, aw: False, rs: ReadAsync, ws: Idle, in: 0, serverEndpoint: Unspecified/{myserver}:6380, mgr: 10 of 10 available, clientName: {myclient}, IOCP: (Busy=0,Free=1000,Min=4,Max=1000), WORKER: (Busy=38,Free=8153,Min=4,Max=8191), v: 2.0.601.3402 (Please take a look at this article for some common client-side issues that can cause timeouts: https://stackexchange.github.io/StackExchange.Redis/Timeouts)
.
Timeout performing GET (2000ms), next: GET key1, inst: 1, qu: 0, qs: 6, aw: False, rs: ReadAsync, ws: Idle, in: 34344, serverEndpoint: Unspecified/{myserver}:6380, mgr: 10 of 10 available, clientName: {myclient}, IOCP: (Busy=0,Free=1000,Min=4,Max=1000), WORKER: (Busy=39,Free=8152,Min=4,Max=8191), v: 2.0.601.3402 (Please take a look at this article for some common client-side issues that can cause timeouts: https://stackexchange.github.io/StackExchange.Redis/Timeouts)
.
Timeout performing GET (2000ms), next: GET key2, inst: 12, qu: 0, qs: 10, aw: False, rs: ReadAsync, ws: Idle, in: 10159, serverEndpoint: Unspecified/{myserver}:6380, mgr: 10 of 10 available, clientName: {myclient}, IOCP: (Busy=0,Free=1000,Min=4,Max=1000), WORKER: (Busy=25,Free=8166,Min=4,Max=8191), v: 2.0.601.3402 (Please take a look at this article for some common client-side issues that can cause timeouts: https://stackexchange.github.io/StackExchange.Redis/Timeouts)
Azure stats :
Memory 105MO~ / CPU : 0%~25%
Thank you ;
Upvotes: 2
Views: 554
Reputation: 2570
It looks like you're experiencing a backup of requests/responses on the client machine which causes the later requests to timeout. This could be because of thread starvation or due to expensive response processing logic.
In all three exceptions, the WORKER
sections show the Busy
count of threads greater than Min
count that .NET has reserved in the ThreadPool
. You should adjust your ThreadPool
settings to increase the min count or find out how to reduce the number of worker threads in your client such that is less than Min
In two of the exceptions, in: number
shows a number
greater than 0. This indicates there are bytes on the response stream, waiting to be read by your client application. This can be caused by a client application that sends requests faster than it can process their responses. Slow response processing usually indicates expensive logic being done with the response values, though this can be slowed down further due to thread starvation.
https://stackexchange.github.io/StackExchange.Redis/Timeouts
https://learn.microsoft.com/azure/azure-cache-for-redis/cache-troubleshoot-client#traffic-burst
Upvotes: 1