Open
Description
Thanks for wanting to report an issue you've found in node_redis. Please delete
this text and fill in the template below. Please note that the issue tracker is only
for bug reports or feature requests. If you have a question, please ask that on gitter.
If unsure about something, just do as best as you're able.
Note that it will be much easier to fix the issue if a test case that reproduces
the problem is provided. It is of course not always possible to reduce your code
to a small test case, but it's highly appreciated to have as much data as possible.
Thank you!
- Version: 2.8.0
- Platform: Node.js 8.11.1on node:8-alpine docker image on Kubernetes 1.9.3
- Description: On different environments different default tcp timeouts might occur. Currently AFAIK node-redis doesn't allow to configure socket timeout. I find it problematic on my prod environment, when redis server (behind a k8s service, a kind of load balancer) is down for couple of seconds, node_redis client is hanged trying to reconnect. Even though redis starts responding, the client is still hanged until it reaches a timeout which seems to be 130 seconds in my case.
I would like to configure redis client to wait only a given timeout.
The deprecated param connect_timeout seems to not work as expected.
Is there any way to configure socket timeout in node-redis?