0

I'm trying to connect to my Heroku Redis instance (free/hobby dev version) using the URL. It seems to connect fine, but once I try any commands, it fails and gives:

ConnectionError: Error while reading from MY_URL : 'An existing connection was forcibly closed by the remote host'

The code that runs without errors is:

import redis
my_redis = redis.from_url(MY_URL)

As soon as I try:

my_redis.set('foo', 'bar')

I get the error every time. I'm not sure what I'm doing wrong as I am following the exact python guide here. Below are my config settings. enter image description here

3
  • stackoverflow.com/questions/13128363/… Commented Mar 16, 2022 at 3:45
  • @FrankYellin Already saw that and not sure how that helps. I'm not managing the server so I don't have access to the config file. If there is something I'm missing then please explain. I'm completely new to Redis. Commented Mar 16, 2022 at 3:55
  • Please don't post screenshots of text. They can't be searched or copied, or even consumed by users of adaptive technologies like screen readers. Instead, paste the code as text directly into your question. If you select it and click the {} button or Ctrl+K the code block will be indented by four spaces, which will cause it to be rendered as code. Commented Mar 16, 2022 at 10:59

1 Answer 1

0

In the config is says that it requires TLS, therefore, the setup should be as follows: enter image description here After using this setup, everything started to work fine.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.