2

Why when I debugging in Visual studio I always get exception StackExchange.Redis.RedisTimeoutException if I force use redis in immediate windows or trying to move debugging line to line wher I use redis.

If I use step in to or step over and I nothing change manually everythings is work correctly and redis respons.

2 Answers 2

1

I believe this is caused due to:

1/ StackExchange.Redis have relatively short timeout by default

2/ Debugging cause threads to be suspended

The break point is hit and you are spending time inspecting states while StackExchange.Redis keep counting time ( The timer is not paused )

The solution for this is to change the timeouts configurations based on Debugger.IsAttached

If you detect debugger is attached, change the configuration of syncTimeout, connectTimeout to higher number

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

Comments

0

This is what I was able to see. The qu (queue unsent) and queue are both 3 in this case, which indicates that the command wasn't even sent to Redis, which is why you are getting a timeout on the client side.

'mgr: ExecuteSelect, err: never, queue: 3, qu: 3, qs: 0, qc: 0, wr: 0, wq: 1, in: 0, ar: 0

1 Comment

Ok, but what do I need to do to get it working, because now I have a big problem when I manipulate code when I debugging.

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.