It was not possible to connect to the redis server(s); to create a disconnected multiplexer, disable AbortOnConnectFail. SocketFailure on PING
參考stack overflow上文章 http://stackoverflow.com/questions/30895507/it-was-not-possible-to-connect-to-the-redis-servers-to-create-a-disconnected
是因為在StackExchange.Redis會默認 abortconnect=true,即當redis連接報錯(如服務器上停止redis service等)時StackExchange會自動停止,即便后來redis服務端修好能夠接通時,也不會自動連接。
所以需要在連接字符串里將值設置為false。若在webconfig中寫成 <RedisCaching Enabled="false" ConnectionString="88.110.22.88,abortConnect=false" />
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 thatStackExchange.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.