Client reconnect should have a backoff. #400

Closed
mfrobben opened this Issue Mar 13, 2013 · 2 comments

Comments

Projects
None yet
3 participants
@mfrobben

Our RedisToGo instance went down today. We have a node_redis client with a registered error handler but for some reason it continued spewing unhandled exceptions for ETIMEDOUT and ECONNREFUSED, which went to our dev error emailer at a rate of 10+ / sec.

There should be a backoff on retries or max retry count option to avoid 900+ retries before folks can respond to a down server. :)

@brycebaril

This comment has been minimized.

Show comment Hide comment
@brycebaril

brycebaril Mar 13, 2013

Member

Both of these are there, a retry delay and a backoff as it has more failures and a max_attempts that should cut it off. Is it possible for you to paste in some of the pertinent code such as your error handler?

It is entirely possible these features are misbehaving in some way for this type of connection error.

Member

brycebaril commented Mar 13, 2013

Both of these are there, a retry delay and a backoff as it has more failures and a max_attempts that should cut it off. Is it possible for you to paste in some of the pertinent code such as your error handler?

It is entirely possible these features are misbehaving in some way for this type of connection error.

@mfrobben

This comment has been minimized.

Show comment Hide comment
@mfrobben

mfrobben Mar 13, 2013

Aha! The error hander was getting set up in the callback from client.auth(), not before. It appeared to be working because if the server connected normally, the error handler was firing...but in these types of cases where the error occurred before auth could return, we actually never had the error handler set up. Bug on our side. Apologies!

Aha! The error hander was getting set up in the callback from client.auth(), not before. It appeared to be working because if the server connected normally, the error handler was firing...but in these types of cases where the error occurred before auth could return, we actually never had the error handler set up. Bug on our side. Apologies!

@mfrobben mfrobben closed this Mar 13, 2013

@BridgeAR BridgeAR added the question label Mar 22, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment