2

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%

enter image description here

Thank you ;

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

2 Comments

thank you for your response , related to WORKER , we tried before adjust the value and increase the number of workers SetMinThreads(250,250) and this cause the server to down many times per day suddenly, and for the number i'am really confused in the official docs "For instance, using pipelining Redis running on an average Linux system can deliver even 1 million requests per second" , i think that Redis can accept hug number of requests ! (i updated question with some azure stats)
When investigating more i find out that redis support until 16DB , in my current project i'am using only the first one , if i use others does this can have effect to reduce timeouts exceptions ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.