2

I am trying to set key-value pairs in Azure Redis cache using StackExchange.Redis client in Visual Studio. This is the code I have:

ConnectionMultiplexer connection=ConnectionMultiplexer.Connect("connection_name,ssl=true,password=some_password");

IDatabase cache = connection.GetDatabase();      
for (int i = 0; i < 500; i++)
{
cache.StringSet("key" + i, "value" + i);
}

However, I get TimeoutException while the code is setting some random key value pair. What could be the issue and how should I resolve it? Thanks.

2 Answers 2

1
  • could be a server stall ("slowlog get" and the Redis server logs are the first things to look at)
  • could be a network infrastructure stall
  • could be a library glitch
  • could just be blocked on data (perhaps try a slightly higher timeout)

The error message should include a bunch of numbers. If you can tell me those numbers, I might be able to say more.

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

Comments

0

This is Azure Redis, managed service. In the past there were definitely issues like this reported with smallest sizes, e.g Basic 250MB. If you use this size, try with bigger size, say Standard 2.5GB.

Comments

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.