You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a service that is connected to multiple Redis servers. We noticed that after a connection loss, some of the connections suddenly started throwing weird auth errors.
WRONGPASS invalid username-password pair or user is disabled.
After a bit of digging we discovered that we have some default options that we use for each of our redis connections, and this object reference is overwritten by each redis client we instantiate.
A simple setup to run into the problem immediately looks like this, but if you connect to redis directly after instantiating the redis client, you won't notice the error until the client tries to reconnect.
Description
We have a service that is connected to multiple Redis servers. We noticed that after a connection loss, some of the connections suddenly started throwing weird auth errors.
After a bit of digging we discovered that we have some default options that we use for each of our redis connections, and this object reference is overwritten by each redis client we instantiate.
A simple setup to run into the problem immediately looks like this, but if you connect to redis directly after instantiating the redis client, you won't notice the error until the client tries to reconnect.
You could argue this is done by design but it feels a bit strange and cost us a few hours of debugging. Code which leads to this is here:
https://github.com/redis/node-redis/blob/master/packages/client/lib/client/index.ts#L248
Node.js Version
v20.15.1
Redis Server Version
7.2.5
Node Redis Version
4.6.7
Platform
any
Logs
No response
The text was updated successfully, but these errors were encountered: