The error you are getting is usually a sign that you have not set abortConnect=false in your connection string. The default value for abortConnect is true, which makes it so that StackExchange.Redis won’t reconnect to the server automatically under some conditions. We strongly recommend that you set abortConnect=false in your connection string so that SE.Redis will auto-reconnect in the background if a network blip occurs.
Netcore :
pack: Microsoft.AspNetCore.DataProtection.StackExchangeRedis
using StackExchange.Redis;
public static void Main(string[] args) {//Reids var redis = ConnectionMultiplexer.Connect("localhost,abortConnect=false"); // or "localhost,abortConnect=false,connectTimeout=30000,responseTimeout=30000" var s= redis.GetStatus(); CreateHostBuilder(args).Build().Run(); }
Similar Posts:
- Redis Connect Error: It was not possible to connect to the redis server(s); to create a disconnected multiple
- [Solved] Java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Double
- [Two Solutions] non-static method xxx() cannot be referenced from a static context
- 【Java】No enclosing instance of type XXX is accessible. Must qualify the allocation with an enclos…
- Java error: No enclosing instance of type E is accessible. Must qualify the allocation with an enclosing
- Eclipse Error:The selection cannot be launched, and there are no recent launches
- [Problems with the use of internal classes] No enclosing instance of type Outer is accessible. Must qualify the allocation with an enclo
- [Solved] Java Call Error: java.lang.IllegalArgumentException: wrong number of arguments
- Convert Object to List>, avoiding Unchecked cast: ‘java.lang.Object’ to ‘java.util.List
- Solution to the problem of Java program “resource leak: ‘SC’ is never closed” in vscode