StackExchange.Redis icon indicating copy to clipboard operation
StackExchange.Redis copied to clipboard

StackExchange.Redis.RedisConnectionException: UnableToResolvePhysicalConnection on EXEC

Open axefrog opened this issue 12 years ago • 3 comments

This is more of a question than an issue. My app is experiencing an exception periodically which I'm guessing may be brief network glitches with my hosting provider?

StackExchange.Redis.RedisConnectionException: UnableToResolvePhysicalConnection on EXEC

What are the conditions under which this exception is thrown, instead of waiting for a connection to become available? Is there a way I can make the library unconditionally tolerant of prolonged disconnected periods? I'm happy for it to hold up the entire application while waiting for reconnection, as it's a back end process and of course anything is preferable to a flat out crash.

axefrog avatar Jul 10 '14 03:07 axefrog

That will happen when connectivity is interrupted. In most use-cases, the incoming load would quickly swamp any backlog mechanism, so: it bails. Your best bet, however, is to check IsConnected before executing, and taking appropriate steps at the call-site.

On 10 July 2014 04:06, Nathan Ridley [email protected] wrote:

This is more of a question than an issue. My app is experiencing an exception periodically which I'm guessing may be brief network glitches with my hosting provider?

StackExchange.Redis.RedisConnectionException: UnableToResolvePhysicalConnection on EXEC

What are the conditions under which this exception is thrown? Is there a way I can make the library unconditionally tolerant of prolonged disconnected periods? I'm happy for it to hold up the entire application while waiting for reconnection, as it's a back end process and of course anything is preferable to a flat out crash.

— Reply to this email directly or view it on GitHub https://github.com/StackExchange/StackExchange.Redis/issues/68.

Regards,

Marc

mgravell avatar Jul 10 '14 06:07 mgravell

Yep that did the trick, thanks!

axefrog avatar Jul 12 '14 01:07 axefrog

Is there not a way to auto-reconnect? Checking IsConnected on every command can be cumbersome.

TimPosey2 avatar Jun 09 '15 21:06 TimPosey2