CacheModule kills app if theres no redis connection
See original GitHub issueI’m submitting a…
[ ] Regression
[ ] Bug report
[ ] Feature request
[x] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.
Current behavior
Currently when i’m using CacheModule.register and redis connection fails, the server exits with an error:
Error: Redis connection to redis:6379 failed - getaddrinfo ENOTFOUND redis redis:6379
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:67:26)
Expected behavior
Handle the error to just log the error and not break the entire app, maybe add a retry exponentially.
Minimal reproduction of the problem with instructions
What is the motivation / use case for changing the behavior?
Environment
Nest version: 5.4.0
For Tooling issues:
- Node version: v10.6.0
- Platform: Mac
Others:
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Kill nestjs - node.js process while lost redis connection ...
It means that the app will be still alive and nothing happen if the redis connection will be restored, I won't be able...
Read more >What if Redis Stops Working - How Do I Keep My App Running
An interesting question came up on the CacheManager repository in issue 146. What do I do, if the Redis server dies and might...
Read more >express-redis-cache-ee-bug-fix - npm
A module to make Express interact with Redis (create, get, delete). You can automatically cache all your most popular routes in Redis.
Read more >Advanced NestJS techniques — Part 4 — Logging Redis ...
In our quest to log every call to services our NestJS app depends on, today we'll look at how to log Redis commands....
Read more >Teleport Changelog | Teleport Docs
When accepting Application Access requests, Teleport did not sufficiently validate client ... Teleport 9 added Redis protocol support to Database Access.
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 think we should keep this opened to solve this problem out-of-the-box
@atte-backman I tried it but inside a service, seems that inside the AppModule it doesn’t breaks the app, Thanks!! 💯