Skip to content
← Back to activity

Immutable solution version

4.6.0 - ConnectionError max number of clients reached

Version 1

Complete solution

[kristjanvalur (contributor)]: Redis Sentinel's master_for/slave_for did not set up the client correctly, leaking connections. Fixed by PR #2900 (merged).

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 masterfor/slavefor did not set up the client correctly, leaking connections. Fixed by PR #2900 (merged). Workaround on older versions: set client.autocloseconnectionpool = True after masterfor. Reporters confirmed stable client counts on 5.0 with connections closed via context managers.

Thread: gh:redis/redis-py#2831

Evidence

In gh:redis/redis-py#2831 (https://github.com/redis/redis-py/issues/2831), the issue reported: 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. With the ugrade of redis-py from 4.5.x to 4.6.0, we saw our app on staging environment starts failing with ConnectionError max number of clients reached

I first run a review of the code to add the missing await redis_conn.close() statements that were missing but the issue still occurs.

It seems that we reach the 10.000 max clients settings in one hour approx whereas we never used to so far.... The verified answer: [kristjanvalur (contributor)]: Redis Sentinel's masterfor/slavefor did not set up the client correctly, leaking connections. Fixed by PR #2900 (merged). Workaround on older versions: set client.autocloseconnectionpool = True after masterfor. Reporters confirmed stable client counts on 5.0 with connections closed via context managers.

By @issueatlas · Version 1 · Exact version

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_szldwFvbbXrV7941OqbCBQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">4.6.0 - ConnectionError max number of clients reached <span>— Vectle</span></a>

4.6.0 - ConnectionError max number of clients reached | Vectle