REDIS INVESTIGATION REPORT

Documentation for Sessions

Redis Investigation Report — Session 128.2

From: Browser/Cowork Agent To: Session 128.2 (Cursor Agent) Date: 2026-02-20 Status: COMPLETE — Root cause identified, fix known


Redis Service

Redis Service Variables (Raw Editor)

REDIS_PASSWORD="PIf..."  (redacted)
REDIS_PUBLIC_URL="redis://default:${REDIS_PASSWORD}@${RAILWAY_TCP_PROXY_DOMAIN}:${RAILWAY_TCP_PROXY_PORT}"
REDIS_URL="redis://${REDISUSER}:${REDIS_PASSWORD}@${REDISHOST}:${REDISPORT}"
REDISHOST="${{RAILWAY_PRIVATE_DOMAIN}}"
REDISPASSWORD="${{REDIS_PASSWORD}}"
REDISPORT="6379"
REDISUSER="default"

Key finding: REDIS_URL on the Redis service itself resolves to redis://default:***@redis.railway.internal:6379 (uses private domain). There is NO REDIS_PRIVATE_URL in the 7 user-defined variables — it must be one of the 13 Railway-auto-added variables.


backend-api (REDIS_URL) — api.gograb.space


backend-ai-api (REDIS_URL) — ai-api.gograb.space


backend-docs-api (REDIS_URL) — docs-api.gograb.space


backend-vitto-api (VITTO_REDIS_URL) — vitto-api.gograb.space


Deploy Logs (backend-vitto-api — post-fix)

After fixing VITTO_REDIS_URL to use ${{Redis.REDIS_URL}}/0, the deploy logs confirmed:

LOG [RedisService] Redis connected
LOG [RedisService] Redis connected via VITTO_REDIS_URL
LOG [TaskQueue] BullMQ connected to Redis at redis.railway.internal:6379
LOG [SmartRouter] Health check complete: 2/2 providers healthy
LOG [NestApplication] Nest application successfully started
🚀 VITTO Super-Agent API READY on port 3003 (Railway)

Redis is fully working when using ${{Redis.REDIS_URL}} instead of ${{Redis.REDIS_PRIVATE_URL}}.


Root Cause Analysis

The root cause is identical across all 4 backends: All services were configured with ${{Redis.REDIS_PRIVATE_URL}} which is a Railway-auto-generated variable that resolves to 127.0.0.1:6379 instead of the actual private network address redis.railway.internal:6379.

The working reference is ${{Redis.REDIS_URL}} which resolves to redis://default:***@redis.railway.internal:6379 — this uses the actual private domain name and works correctly within Railway's internal network.

Why REDIS_PRIVATE_URL resolves to 127.0.0.1: This appears to be a Railway platform behavior where REDIS_PRIVATE_URL is meant for use within the Redis container itself (where localhost makes sense), NOT for other services connecting to Redis.


Recommended Fix

Change REDIS_PRIVATE_URL → REDIS_URL in 3 services:

Service Current Value Fix To
backend-api ${{Redis.REDIS_PRIVATE_URL}}/1 ${{Redis.REDIS_URL}}/1
backend-ai-api ${{Redis.REDIS_PRIVATE_URL}}/2 ${{Redis.REDIS_URL}}/2
backend-docs-api ${{Redis.REDIS_PRIVATE_URL}}/3 ${{Redis.REDIS_URL}}/3
backend-vitto-api ${{Redis.REDIS_URL}}/0 ✅ Already fixed

This is the exact same fix that was already successfully applied to backend-vitto-api earlier in this session. The deploy passed healthcheck and Redis connected at redis.railway.internal:6379.

Each variable change in Railway will trigger an automatic redeploy. All 3 fixes can be applied simultaneously — they are independent.


Verification Plan

After applying fixes:

  1. Each service will auto-redeploy
  2. Check deploy logs for Redis connected messages
  3. Verify no more Redis connection failed warnings in logs
  4. Confirm Redis Metrics show increased connections (currently only vitto connects)