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
Percy
Percy7mo ago
Project ID: 702d396a-95bd-40d9-aefb-6919279b0e94
quinnvaughn
quinnvaughn7mo ago
702d396a-95bd-40d9-aefb-6919279b0e94
quinnvaughn
quinnvaughn7mo ago
This is definitely due to tls issues with the code.
No description
quinnvaughn
quinnvaughn7mo ago
Which it works fine on Heroku (I'm attempting at using Railway instead) with a rediss:// url so that's the main issue.
No description
Brody
Brody7mo ago
the redis databases railway provides do not have tls
quinnvaughn
quinnvaughn7mo ago
So I just have to use a third party one?
Brody
Brody7mo ago
or turn off the tls requirement?
quinnvaughn
quinnvaughn7mo ago
Making it undefined or {} seems to have the same issue Not sure how to turn it off
Brody
Brody7mo ago
can you connect to the database locally?
quinnvaughn
quinnvaughn7mo ago
You mean can I connect to the prod redis on Railway on my localhost?
Brody
Brody7mo ago
yes
quinnvaughn
quinnvaughn7mo ago
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
Brody
Brody7mo ago
can you try to add a 3 second sleep to your start command?
quinnvaughn
quinnvaughn7mo ago
You mean my yarn start? How would I? Isn't that what something like connectTimeout is for on the settings?
Brody
Brody7mo ago
sleep 3 && yarn start
quinnvaughn
quinnvaughn7mo ago
No description
Brody
Brody7mo ago
^
quinnvaughn
quinnvaughn7mo ago
Right but I'm saying isn't that the point of that setting?
Brody
Brody7mo ago
nope
quinnvaughn
quinnvaughn7mo ago
You want me to push the sleep code to prod to test this?
Brody
Brody7mo ago
it doesnt involve a code change?
quinnvaughn
quinnvaughn7mo ago
Oh I mean it works on localhost Without the sleep
quinnvaughn
quinnvaughn7mo ago
This, correct?
No description
quinnvaughn
quinnvaughn7mo ago
If so, same issue
quinnvaughn
quinnvaughn7mo ago
No description
quinnvaughn
quinnvaughn7mo ago
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.