On September, 2024, Heroku updated REDIS to use a secure TLS connection URL. See this Help article for more information on what config var changes you must make to your Redis configuration.
In my case, I was using redis.Redis python function to create the connection like this:
import os
from urllib.parse import urlparse
import redis
url = urlparse(os.environ.get("REDIS_URL"))
r = redis.Redis(host=url.hostname, port=url.port, password=url.password, ssl=(url.scheme == "rediss"), ssl_cert_reqs=None)
I was missing the parameters ssl=(url.scheme == "rediss") and ssl_cert_reqs=None
Make sure you are specifying the SSL related configuration parameters ssl=True and ssl_cert_reques=None