#redis catch connection error
9 messages · Page 1 of 1 (latest)
i think manually since i'm just using redis just to have sessions persist server restarts and to be able to access sessions in case a user account is compromised so i can force log them out
So where do you call the code that actually connects to redis? In the post you only showed how you instantiate the objects, but that's all synchronous calls that don't initiate any connection.
Are you passing those to somewhere?
this is literally it and this little part
app.use(
session({
store: redisStore
if redis has valid connection settings everything works
Is that the express session middleware? In that case, you're going to have to look for an Express-related answer. There's no NestJS involved there.
yeah it is express-session
but my issue is whenever my connection settings are wrong there are error log
and the whole nest application just hangs i just want to resolve that issue
ok this is new just reran the code
and now i get
[ioredis] Unhandled error event: Error: connect ECONNREFUSED 127.0.0.1:6379
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1634:16)