Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to recover from Redis disconnect #2246

Closed
dannyhuly opened this issue May 21, 2019 · 4 comments
Closed

Unable to recover from Redis disconnect #2246

dannyhuly opened this issue May 21, 2019 · 4 comments

Comments

@dannyhuly
Copy link

dannyhuly commented May 21, 2019

I'm submitting a...


[ ] Regression 
[x ] Bug report
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.

Current behavior

Redis microservice is unable to detect disconnect and/or reconnect.

Expected behavior

Try to recover after disconnect or emit an error event

Minimal reproduction of the problem with instructions

  1. create Nest Rest microservice https://docs.nestjs.com/microservices/redis
  2. setup Redis server (use docker redis:latest)
  3. start the microservice
  4. kill Redis server
  5. send message to Redis

What is the motivation / use case for changing the behavior?

  • app recover
  • health-check

Environment

Nest version: 6

For Tooling issues:

  • Node version: v10.15.1
  • Platform: Mac, Linux, Windows
@kamilmysliwiec
Copy link
Member

Have you tried using retryAttempts and retryDelay? https://docs.nestjs.com/microservices/redis#options

@dannyhuly
Copy link
Author

@kamilmysliwiec sadly the retryAttempts and retryAttempts only works when the microservice is loading. If the app is up and the redis disconnect noting happens.

Please see Minimal reproduction of the problem with instructions section.

@kamilmysliwiec
Copy link
Member

Fixed in 6.4.0 :) (remember to add retryAttempts to client instance options as well)

@lock
Copy link

lock bot commented Sep 29, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Sep 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants