REDIS_URL suddenly not working for service with new deploy
ymc182
PROOP

6 months ago

REDIS_URL suddenly not working for service with new deploy, need to change all to REDIS_PUBLIC_URL

getting dns error

Solved$10 Bounty

7 Replies

sarahkb125
EMPLOYEE

6 months ago

Hi there, a few questions:

  • how are you trying to access redis - from what client?

  • I see a public URL on redis - when was this added?


Status changed to Awaiting User Response Railway 6 months ago


sarahkb125

Hi there, a few questions:how are you trying to access redis - from what client?I see a public URL on redis - when was this added?

ymc182
PROOP

6 months ago

Hi, I have around 10 microservice accessing the Redis using internal URL and it was fine last 2 months

suddenly yesterday some server with new deployment (no redis side code change) suddenly throwing
[ioredis] Redis connection error: DNSException: syscall: "getaddrinfo", errno: 4, code: "ENOTFOUND"

so I try to change to public URL as a workaround and it work

eg. server deployed 18 hours ago -> connected to internal url and still working
server with new deploy (no matter manual trigger or github trigger, internal url not working and need to change the redis url to public


Status changed to Awaiting Railway Response Railway 6 months ago


ymc182

Hi, I have around 10 microservice accessing the Redis using internal URL and it was fine last 2 monthssuddenly yesterday some server with new deployment (no redis side code change) suddenly throwing [ioredis] Redis connection error: DNSException: syscall: "getaddrinfo", errno: 4, code: "ENOTFOUND"so I try to change to public URL as a workaround and it workeg. server deployed 18 hours ago -> connected to internal url and still workingserver with new deploy (no matter manual trigger or github trigger, internal url not working and need to change the redis url to public

Do you have ?family=0 appended to each connection string?


ymc182
PROOP

6 months ago

no I don't, in code simply new Redis(process.env.REDIS_URL) (ioredis)
and env var it using railway variable for the connection string, and public works / private don't


ymc182
PROOP

6 months ago

[ioredis] Unhandled error event: undefined
[ioredis] Unhandled error event: undefined
[ioredis] Redis connection error: DNSException: syscall: "getaddrinfo", errno: 4, code: "ENOTFOUND"

also the service (server) without new deployment stay connect(eg. 3 days ago) thru private just fine
only the service have new deployment seems to have issue


Try ${{Redis.REDIS_URL}}?family=0


ymc182
PROOP

6 months ago

Thanks! this seems working but is there any reason it was working but now I need to add family=0?


Status changed to Solved chandrika 6 months ago


Status changed to Open chandrika 6 months ago


Status changed to Solved ymc182 6 months ago


Loading...