ECONNREFUSED crash since version 2.6.1
See original GitHub issue- Version: 2.6.1
- Platform: Node.js v4.2.6 on OS X 10.11.5
- Description: Description of your issue, stack traces from errors and code that reproduces the issue
The default retry strategy:
var client = redis.createClient({
retry_strategy: function (options) {
if (options.error.code === 'ECONNREFUSED') {
// End reconnecting on a specific error and flush all commands with a individual error
return new Error('The server refused the connection');
}
...
// reconnect after
return Math.max(options.attempt * 100, 3000);
}
});
Crashes since version 2.6.1
if (options.error.code === 'ECONNREFUSED')
^
TypeError: Cannot read property 'code' of null
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
ECONNREFUSED crash since version 2.6.1 #1080 - GitHub
I'm testing what happens to my server when the cache layer(redis) crashes or there is some sort of outage that prevents redis from...
Read more >Error: connect ECONNREFUSED 127.0.0.1:389 Apollo-React ...
The service starts success, but when I send the first request the service crashed. I'm using this versions: npm v5.6.0; node v8.9.4 ...
Read more >Bug listing with status RESOLVED with resolution NEEDINFO ...
... "gentoo-sources kernel crash nvidia" status:RESOLVED resolution:NEEDINFO ... Bug:195897 - "after mi glibc 2.6.1 upgrade from 2.5.x there are some ...
Read more >ECONNREFUSED on runtime - Drivers & ODMs - MongoDB
Hi all, I am running a web app which daily is receiving lots of data and hence manipulating them and storing them into...
Read more >LineRate Release Notes, version 2.6.1 - AskF5 - F5 Networks
The bug is triggered because a single source IP address can have at most 65535 connections open to a single destination IP address....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I am having the same problem as @elstonie. The
options
object doesn’t contain anyerror
if connection to Redis was lost. That happens however only when trying to reconnect for the first time, following calls ofretry_strategy
provide anerror
.@BridgeAR thank you, I solved the problem. What I didn’t know is that in order to make this work, I have to listen to
error
event, or I get unhandled exceptions all over the place