You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
λ node test.js
[ioredis] Unhandled error event: Error: connect ECONNREFUSED 127.0.0.1:6379
at Object.exports._errnoException (util.js:1026:11)
at exports._exceptionWithHostPort (util.js:1049:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1085:14)
2
[ioredis] Unhandled error event: Error: connect ECONNREFUSED 127.0.0.1:6379
at Object.exports._errnoException (util.js:1026:11)
at exports._exceptionWithHostPort (util.js:1049:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1085:14)
4
[ioredis] Unhandled error event: Error: connect ECONNREFUSED 127.0.0.1:6379
at Object.exports._errnoException (util.js:1026:11)
at exports._exceptionWithHostPort (util.js:1049:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1085:14)
6
[ioredis] Unhandled error event: Error: connect ECONNREFUSED 127.0.0.1:6379
at Object.exports._errnoException (util.js:1026:11)
at exports._exceptionWithHostPort (util.js:1049:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1085:14)
8
What I read from the docs about the reconnecting event is:
The argument of the event is the time (in ms) before reconnecting.
So what I conclude is that with the default retryStrategy, the module will wait 2, 4, 6, 8, 10, ... milliseconds after a connection error before trying to connect again.
Is that value really meant to be milliseconds? After 50 attempts, the module will be waiting only 100 milliseconds before trying to connect again. Isn't this default strategy risking to "flood" the server of requests?
The text was updated successfully, but these errors were encountered:
matteocontrini
changed the title
Reconnection: seconds or milliseconds?
Concerns about reconnection strategy
Dec 18, 2016
If you run this code with no Redis instances listening on localhost
The output wil be
What I read from the docs about the
reconnecting
event is:So what I conclude is that with the default
retryStrategy
, the module will wait 2, 4, 6, 8, 10, ... milliseconds after a connection error before trying to connect again.Is that value really meant to be milliseconds? After 50 attempts, the module will be waiting only 100 milliseconds before trying to connect again. Isn't this default strategy risking to "flood" the server of requests?
The text was updated successfully, but these errors were encountered: