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
Hi, we performed some tests with cluster failover under load and got uncaught exception.
Error: connect ECONNREFUSED 172.28.1.1:6379
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1141:16)
Emitted 'error' event on Socket instance at:
at emitErrorNT (internal/streams/destroy.js:92:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
at processTicksAndRejections (internal/process/task_queues.js:84:21) {
errno: 'ECONNREFUSED',
code: 'ECONNREFUSED',
syscall: 'connect',
address: '172.28.1.1',
port: 6379
}
The problem seems to be that in some cases Redis::connect attaches error handler to stream too late after StandaloneConnector created stream.
I've reproduced this issue on Node.JS 12 with Bluebird 3.5.x. With built-in promise it seems to work, but i cannot say for sure.
In any case, current scheme with connectors and promises keeps possibility of such errors: Stream::destroy already triggers error in nextTick to give users opportunity to attach error listener. If because of promises error is attached later - we get uncaught exception.
One solution would be to attach "error" event handler in StandaloneConnector. Another would be to make stream instantiation synchronous.
The text was updated successfully, but these errors were encountered:
Hi, we performed some tests with cluster failover under load and got uncaught exception.
The problem seems to be that in some cases Redis::connect attaches error handler to stream too late after StandaloneConnector created stream.
I've reproduced this issue on Node.JS 12 with Bluebird 3.5.x. With built-in promise it seems to work, but i cannot say for sure.
In any case, current scheme with connectors and promises keeps possibility of such errors: Stream::destroy already triggers error in nextTick to give users opportunity to attach error listener. If because of promises error is attached later - we get uncaught exception.
One solution would be to attach "error" event handler in StandaloneConnector. Another would be to make stream instantiation synchronous.
The text was updated successfully, but these errors were encountered: