Redis TLS
How do I get a TLS url for Redis through railway? IORedis refuses to connect with a normal redis:// url on prod (I'm getting the ERR Connect issue), which is what it by default generates (as far as I can tell, there is no TLS version)
27 Replies
Project ID:
702d396a-95bd-40d9-aefb-6919279b0e94
702d396a-95bd-40d9-aefb-6919279b0e94
This is definitely due to tls issues with the code.
Which it works fine on Heroku (I'm attempting at using Railway instead) with a rediss:// url so that's the main issue.
the redis databases railway provides do not have tls
So I just have to use a third party one?
or turn off the tls requirement?
Making it undefined or {} seems to have the same issue
Not sure how to turn it off
can you connect to the database locally?
You mean can I connect to the prod redis on Railway on my localhost?
yes
Like that code works fine with just my local computer redis
I will check
Ok it seems to work
But I've tried setting tls to undefined and got the same connection error on prod
can you try to add a 3 second sleep to your start command?
You mean my yarn start? How would I?
Isn't that what something like connectTimeout is for on the settings?
sleep 3 && yarn start
^
Right but I'm saying isn't that the point of that setting?
nope
You want me to push the sleep code to prod to test this?
it doesnt involve a code change?
Oh I mean it works on localhost
Without the sleep
This, correct?
If so, same issue
Which I got this same issue on Heroku because it wasn't a rediss url on the base plan and upgrading it did work with no other code changes.
Ok I feel like an idiot
The reason I needed this on heroku is because it was a TLS url and it wouldn't work without that code. If I remove the TLS code it actually does just work.