Failling to connect to Redis Managed

Issues information

  • databases: Redis
  • Programming language and version: Python 3.9

Failling to connect to Redis Managed

I have a Redis database deployed with the Managed mode but my applications on the same environment do not seem to be able to connect to it.
There is no error, starting the connection just hangs there forever until my requests to the server that are trying to connect to Redis end up in a error 504.

I’m using Python 3.9 and the connection step is:

from redis import Redis

...

redis_conn = Redis(host=REDIS_HOST, port=REDIS_PORT, password=REDIS_PASSWORD)

I tested the exact same thing using Redis in Container with Private mode, by just updating the environment variable alias to use the new Redis database, and it worked without problems. On both cases I used the QOVERY_*_HOST_INTERNAL environment variable.

I know Redis managed is only supposed to be accessible by applications on the same environment but that it’s the case right now and it’s not working.

Can you help me understand what am I missing or where the problem is?

Hello,
If you’re using a managed Redis v6 you need to enable tls since encryption is enabled in order to set a pass word. It looks like your Redis constructor miss a field.

Found this page, maybe it’s the solution you’re looking for.

1 Like

Hello,

That was exactly the problem! Setting ssl=True makes it work.

Thank you for the help!

1 Like