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

Allow reconnect retries on initialisation? #131

Open
martinj opened this issue Jul 9, 2024 · 0 comments
Open

Allow reconnect retries on initialisation? #131

martinj opened this issue Jul 9, 2024 · 0 comments
Labels
support Questions, discussions, and general support

Comments

@martinj
Copy link

martinj commented Jul 9, 2024

Runtime

nodejs

Runtime version

20

Module version

7.0.2

Used with

hapi

Any other relevant information

No response

How can we help?

Is it possible make it auto reconnect redis on startup?
As it is now it will throw and crash Hapi if connection to redis fails.

Noticed that there is a client.disconnect that occurs if the initial connect fails that causes it to throw.
Could that disconnect be optional or removed? https://github.com/hapijs/catbox-redis/blob/master/lib/index.js#L112

From IORedis docs:

By default, ioredis will try to reconnect when the connection to Redis is lost except when the connection is closed manually by redis.disconnect() or redis.quit().

@martinj martinj added the support Questions, discussions, and general support label Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support Questions, discussions, and general support
Projects
None yet
Development

No branches or pull requests

1 participant