現在、MS Enterprise Library 6 Transient Fault Handling アプリケーション ブロックを使用しています。RedisCacheKey
サービスの中断をシミュレートするために無効を提供しました。
一時的な障害処理
var retryStrategy = new FixedInterval(3, TimeSpan.FromSeconds(1));
var retryPolicy = new RetryPolicy<AzureRedisTransientErrorDetectionStrategy>(retryStrategy);
IDatabase cache;
try
{
cache = retryPolicy.ExecuteAction(() => Redis.GetDatabase());
//Redis is a ConnectionMultiplexer
...
} catch { ... }
デバッグ出力の観察
A first chance exception of type 'System.Net.Sockets.SocketException' occurred in System.dll
A first chance exception of type 'System.Net.Sockets.SocketException' occurred in System.dll
A first chance exception of type 'System.Net.Sockets.SocketException' occurred in System.dll
A first chance exception of type 'System.Net.Sockets.SocketException' occurred in System.dll
A first chance exception of type 'System.Net.Sockets.SocketException' occurred in System.dll
A first chance exception of type 'System.Net.Sockets.SocketException' occurred in System.dll
A first chance exception of type 'System.Net.Sockets.SocketException' occurred in System.dll
A first chance exception of type 'System.Net.Sockets.SocketException' occurred in System.dll
A first chance exception of type 'System.Net.Sockets.SocketException' occurred in System.dll
A first chance exception of type 'System.Net.Sockets.SocketException' occurred in System.dll
A first chance exception of type 'System.Net.Sockets.SocketException' occurred in System.dll
A first chance exception of type 'System.Net.Sockets.SocketException' occurred in System.dll
A first chance exception of type 'System.Net.Sockets.SocketException' occurred in System.dll
A first chance exception of type 'System.Net.Sockets.SocketException' occurred in System.dll
A first chance exception of type 'System.Net.Sockets.SocketException' occurred in System.dll
A first chance exception of type 'System.Net.Sockets.SocketException' occurred in System.dll
A first chance exception of type 'System.ObjectDisposedException' occurred in System.dll
A first chance exception of type 'System.Net.Sockets.SocketException' occurred in System.dll
A first chance exception of type 'System.Net.Sockets.SocketException' occurred in System.dll
A first chance exception of type 'System.Net.Sockets.SocketException' occurred in System.dll
A first chance exception of type 'System.Net.Sockets.SocketException' occurred in System.dll
A first chance exception of type 'System.Net.Sockets.SocketException' occurred in System.dll
A first chance exception of type 'System.Net.Sockets.SocketException' occurred in System.dll
A first chance exception of type 'System.ObjectDisposedException' occurred in System.dll
A first chance exception of type 'System.Net.Sockets.SocketException' occurred in System.dll
A first chance exception of type 'System.Net.Sockets.SocketException' occurred in System.dll
A first chance exception of type 'System.Net.Sockets.SocketException' occurred in System.dll
The thread 0x107c has exited with code 259 (0x103).
A first chance exception of type 'StackExchange.Redis.RedisConnectionException' occurred in StackExchange.Redis.dll
The thread 0x115c has exited with code 259 (0x103).
A first chance exception of type 'StackExchange.Redis.RedisConnectionException' occurred in Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.dll
The thread 0xc04 has exited with code 259 (0x103).
The thread 0x10b8 has exited with code 259 (0x103).
The thread 0x1328 has exited with code 259 (0x103).
The thread 0x1244 has exited with code 259 (0x103).
The thread 0x748 has exited with code 259 (0x103).
The thread 0x14c0 has exited with code 259 (0x103).
The thread 0x1260 has exited with code 259 (0x103).
The thread 0x998 has exited with code 259 (0x103).
The thread 0x10b8 has exited with code 259 (0x103).
The thread 0x145c has exited with code 259 (0x103).
The thread 0x175c has exited with code 259 (0x103).
The thread 0x9a0 has exited with code 259 (0x103).
StackExchange.Redis は Azure Redis キャッシュをスラッシングしていますか? 誰かが似たようなものを実装しましたか?