4.6.0 - ConnectionError max number of clients reached
Redis Vector Search - **Version**: 4.6.0
**Platform**: Python 3.10 / Docker or Linux
**Server** : Redis 7.0.11
**Description**:
We have an application using redis in an async context for months now.
## The fix
[kristjanvalur (contributor)]: Redis Sentinel's master_for/slave_for did not set up the client correctly, leaking connections. Fixed by PR #2900 (merged). Workaround on older versions: set client.auto_close_connection_pool = True after master_for. Reporters confirmed stable client counts on 5.0 with connections closed via context managers.
Thread: gh:redis/redis-py#2831