Fly.io Redis access issue - Seems to be a unique access issue unlike other redis issues posted in this community

Hi, so I know there are multiple issues on this community about redis connection issues from fly.io and I’ve skimmed through multiple of them and yet my issue doesn’t seem to be solved. So I thought, I’d elaborate the error that I was facing.

  1. I have an application deployed via Fly.io in SIN, and my Upstash redis is in the same region.
  2. I followed all the steps here, and the connection to Upstash redis is successful from locally - Upstash for Redis®* · Fly Docs . Infact i did some test writes to the redis, and I verified Upstash redis shows the writes properly in it’s dashboard. I.e, connection to redis from locally is succeeding.
  3. I’m deploying a dockerfile and using fly.toml for specific env vars like REDIS_HOST, REDIS_PASSWORD and so on so forth. If in case that matters. Application is successfully deployed on Fly.io, I’m using a postgres connection too from my app and the postgres db is getting accessed successfully. For reference, this is what I mention in my fly.toml file for the redis relevant settings:
  REDIS_HOST = "redis://redis-username.upstash.io" (have tried deploying without the redis:// prefix too, still gives the same error as below)
  REDIS_PASSWORD = "<password>"
  REDIS_PORT = "6379"
  1. Unfortunately there’s some issue in accessing Redis from Fly.io application. This is the relevant stacktrace from my application:
Error: Redis connection to redis://redis-username.upstash.io:6379 failed - getaddrinfo ENOTFOUND redis://redis-username.upstash.io

Can someone please help on what’s going on and how can I fix this? I’ve tried multiple solutions from umpteen number of redis issue posts from this community (which I came across via a search) and none seem to help. If there’s any further debugging you’d like me to do, to help me with a solution for this - please feel free to let me know!

Thanks!

Hey @jsierles - saw multiple comments from you on redis access issue posts on this community (that I had come across earlier), hence wondering if you could help out in any way here! Thanks a bunch in advance!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.