0

I'm currently using MS Enterprise Library 6 Transient Fault Handling application block. I've provided an invalid RedisCacheKey to simulate service disruptions.

Transient Fault handling

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 { ... }

Observing the debug output

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).

Is StackExchange.Redis thrashing azure redis cache? Has anyone implemented something similar?

Lee Gary
  • 2,357
  • 2
  • 22
  • 38
  • @MarcGravell, can you shed some light for me here pls? – Lee Gary Aug 06 '14 at 09:25
  • This probably isn't the issue, but shouldn't you be returning the result of the GetDatabase() call inside the ExecuteAction call? For example: cache = retryPolicy.ExecuteAction(() => return Redis.GetDatabase()); – Adrian Anttila Oct 12 '14 at 18:47

0 Answers0