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
It seems that the "Implementing Reconnect on Error" section in the official docs for this client contains a bad example. If someone runs this example, each time it reconnects, the old connection will remain open. This will cause a connection leak to redis server.
The reason for this leak is that in each reconnect attempt Redis.createClient() is called, but without closing the old one. Please notice that calling client.close() won't help as well, because it is an instance of a connection from the connection pool.
In order to fix this, you need to call close() on the instance returned from Redis.createClient() - which will close the connection pool.