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
- Exists: YES
- Status: Online
- Source Image: redis:8.6.0
- Region: US East (Virginia, USA), 1 Replica
- Internal hostname:
redis.railway.internal(IPv6 enabled, alias:redis) - Public Networking:
nozomi.proxy.rlwy.net:14089→:6379 - Private Networking:
redis.railway.internal:6379 - Data present: YES — BullMQ keys from backend-vitto-api visible (
bull:vitto-tasks:*), 2 pages of key-value pairs - Metrics: CPU ~0 vCPU, Memory near 0, Public Network Traffic 0 B (expected — internal only)
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
- Variable exists: YES
- Raw value:
${{Redis.REDIS_PRIVATE_URL}}/1 - DB suffix:
/1✅ (correct) - Problem: Uses
REDIS_PRIVATE_URLwhich resolves to127.0.0.1→ BROKEN - PORT: 3000
- Last deploy: "fix(deploy): ensure correct railway.toml fo..." — 16 hours ago, ACTIVE
backend-ai-api (REDIS_URL) — ai-api.gograb.space
- Variable exists: YES
- Raw value:
${{Redis.REDIS_PRIVATE_URL}}/2 - DB suffix:
/2✅ (correct) - Problem: Uses
REDIS_PRIVATE_URLwhich resolves to127.0.0.1→ BROKEN - PORT: 3001
- Last deploy: "fix(deploy): ensure correct railway.toml fo..." — 14 hours ago, ACTIVE
- Note: "This deployment was initiated by Railway. Your service was automatically redeployed."
backend-docs-api (REDIS_URL) — docs-api.gograb.space
- Variable exists: YES
- Raw value:
${{Redis.REDIS_PRIVATE_URL}}/3 - DB suffix:
/3✅ (correct) - Problem: Uses
REDIS_PRIVATE_URLwhich resolves to127.0.0.1→ BROKEN - PORT: 3002
backend-vitto-api (VITTO_REDIS_URL) — vitto-api.gograb.space
- Variable exists: YES
- Raw value:
${{Redis.REDIS_URL}}/0✅ (ALREADY FIXED) - DB suffix:
/0✅ (correct) - Status: WORKING — Fixed earlier in this session by changing from
${{Redis.REDIS_PRIVATE_URL}}/0to${{Redis.REDIS_URL}}/0 - PORT: 3003
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:
- Each service will auto-redeploy
- Check deploy logs for
Redis connectedmessages - Verify no more
Redis connection failedwarnings in logs - Confirm Redis Metrics show increased connections (currently only vitto connects)