2 months ago
Redis arrow to my app seems to be dashed in 1 of the 2 apps i have. What does this mean?
The connection though seems to be working.
Redis connected successfully
Redis ready for commands
Connecting to Redis...
Redis test write/read: OK
REDIS_URL exists: true
Feed cache using Redis
12 Replies
2 months ago
Hey there! We've found the following might help you get unblocked faster:
If you find the answer from one of these, please let us know by solving the thread!
2 months ago
Can you share a screenshot?
The arrow just means you've used a reference variable from service A in service B.
2 months ago
Here it is. In my other app this seems like a solid line. Wondering if something is wrong. The app asks a lot of time after a deploy for re-login will the other doesnt.
Attachments
2 months ago
IIRC there aren't any solid lines, there're only dashed lines when using reference variables.
2 months ago
Cant understand the difference (this is from my other app)
Attachments
2 months ago
The difference is how the variables are connected, which explains your logout issue!
The Arrow Meanings:
Solid Line: Likely a legacy Service Link. This injects all connection variables (Host, Port, Password, etc.) automatically.
Dashed Line: A Reference Variable. This means you likely only mapped one specific variable (like
REDIS_URL) using${{ ...}}syntax.
The Logout Fix: Your app is likely falling back to Memory Storage (which wipes on every deploy) because of that configuration difference.
Check your code: Does it look for
REDISHOST/REDISPORTspecifically? The "Dashed" setup might only be providing REDIS_URL, causing the connection to fail silently and default to memory.Solution: In your App's Variables tab, manually add the missing references (e.g.,
REDISHOST=${{Redis.REDISHOST}}) OR update your code to useREDIS_URL.Sanity Check: Also ensure you have a fixed
SESSION_SECRETvariable set. If you don't, the app generates a new random secret on every deploy, which invalidates all users immediately.
2 months ago
I have done all those correctly and no difference. The only thing i can see from my previous app is this the library i am using for the connection. One has official redis and the other one (dashed line) has ioredis.
2 months ago
ioredis is the culprit then. That explains the dashed line (private networking) and the logouts
Railway's internal private network uses IPv6. The official Redis lib handles this automatically, but ioredis defaults to IPv4, so it fails to connect internally
When it fails, your session middleware is likely silently falling back to MemoryStore (RAM) to keep the app alive. That’s why everything "works" but wipes every time you deploy
Try forcing IPv6 in your connection config:
const redis = new Redis(process.env.REDIS_URL, {
family: 6,
});
That should force it to use the dashed-line connection properly and persist your sessions
2 months ago
Thanks for the reply. I tried this (family: 6) and still dashed line. I have now switched to the official redis library but still dashed...
2 months ago
Ok can you share more details
0x5b62656e5d
(It's supposed to be dashed)
2 months ago
So the problem is in my other app that it is not?