Handoff: Redis Infrastructure Investigation — Railway Dashboard Audit

Investigate why Redis connections fail across all production backends. Verify Railway Redis service, env vars, and networking.

Handoff: Redis Infrastructure Investigation — Railway Dashboard Audit

From: Session 128.2 (Cursor Agent) To: Browser/Cowork Agent Priority: CRITICAL — All 4 production backends are running WITHOUT Redis (degraded state) Estimated Scope: 5 investigation tasks, ~15-20 minutes total Report back: YES — report all findings in structured format (see bottom)


Background (READ THIS FIRST)

All four production backends are logging Redis connection failures every 60 seconds:

WARN [RedisService] Redis connection failed (REDIS_URL): Connection is closed. — using in-memory fallback

What's broken:

Impact: Rate limiting is per-instance only, no distributed locks, no cross-instance Socket.IO pub/sub. Apps work via in-memory fallback but are running degraded.

Known history (Session 128): REDIS_PRIVATE_URL was found resolving to 127.0.0.1. A prior fix switched backends to use public REDIS_URL instead, but the problem persists.

Expected Redis database allocation:

Backend Env Var Redis DB
backend-vitto-api VITTO_REDIS_URL db 0
backend-api REDIS_URL db 1
backend-ai-api REDIS_URL db 2
backend-docs-api REDIS_URL db 3

Task 1: Verify Redis Service Exists and Is Running

Steps

  1. Open Railway dashboard: https://railway.com/project/3990549d-4313-47e4-9682-d17b382bdba2
  2. In the Architecture view, look for a Redis service
  3. Check:
    • Is there a Redis service in the project at all?
    • What is its status? (Online / Offline / Deploying / Failed)
    • Click on the Redis service → go to Metrics tab → is it receiving any connections?
    • Go to Settings tab → note the internal hostname and port
    • Go to Connect tab (or Variables tab) → note the available connection URLs:
      • REDIS_URL — what value does Railway show?
      • REDIS_PRIVATE_URL — what value does Railway show?
      • Any other Redis-related variables

What to report


Task 2: Check REDIS_URL in backend-api Service

Steps

  1. In Railway dashboard, click on the backend-api service (domain: api.gograb.space)
    • Service ID: 1ad0b79a-b722-4c69-920c-5dcb35978f0d
  2. Go to Variables tab
  3. Find the REDIS_URL variable
  4. Check:
    • Does REDIS_URL exist?
    • What is its value? Is it a reference variable like ${{Redis.REDIS_URL}} or a hardcoded URL?
    • Does the URL include a database number suffix? (e.g., /1 at the end for db 1)
    • Is the URL format valid? Should be: redis://default:PASSWORD@HOST:PORT/DB
    • Does the resolved value (if reference variable) look correct?

What to report


Task 3: Check REDIS_URL in backend-ai-api and backend-docs-api Services

Steps

Repeat the same checks as Task 2 for:

  1. backend-ai-api (domain: ai-api.gograb.space)

    • Service ID: fa00811a-db8e-4232-a23f-2becd96615c7
    • Expected: REDIS_URL with /2 database suffix
  2. backend-docs-api (domain: docs-api.gograb.space)

    • Service ID: 0f7af191-d7a4-4366-82b6-312c4ab8fa7e
    • Expected: REDIS_URL with /3 database suffix

What to report (for each)


Task 4: Check VITTO_REDIS_URL in backend-vitto-api Service

Steps

  1. Click on the backend-vitto-api service (domain: vitto-api.gograb.space)
    • Service ID: 072352ed-2e34-468e-bec9-03f6d299f867
  2. Go to Variables tab
  3. Find VITTO_REDIS_URL
  4. Check same things as Task 2
    • Expected: database suffix /0

What to report


Task 5: Check Deploy Logs for Recent Redis Messages

Steps

For backend-api (the simplest to check):

  1. Click on the backend-api service
  2. Go to Deploy Logs tab
  3. Look at the most recent log entries
  4. Search/scroll for any of these messages:
    • Redis configured via REDIS_URL — new log we added (may not be deployed yet)
    • Redis connected — means Redis IS working
    • Redis connection failed — means Redis is NOT connecting
    • REDIS_URL not configured — means the env var is missing entirely
  5. Note the exact error message if connection fails

What to report


Railway Service Reference

Service Domain Service ID
backend-api api.gograb.space 1ad0b79a-b722-4c69-920c-5dcb35978f0d
backend-ai-api ai-api.gograb.space fa00811a-db8e-4232-a23f-2becd96615c7
backend-docs-api docs-api.gograb.space 0f7af191-d7a4-4366-82b6-312c4ab8fa7e
backend-vitto-api vitto-api.gograb.space 072352ed-2e34-468e-bec9-03f6d299f867
Redis (internal only) (find in dashboard)
Project ID — 3990549d-4313-47e4-9682-d17b382bdba2
Environment ID — 1d438b60-52d5-4c89-ba8f-45fff0df308f

Possible Fixes (DO NOT APPLY — Report First)

Based on what you find, one of these is likely the fix:

Scenario Fix
Redis service doesn't exist Provision a new Redis service in the Railway project
Redis service exists but is stopped Restart it
REDIS_URL is empty or missing Add it using the Redis service's connection URL
REDIS_URL uses REDIS_PRIVATE_URL reference Try switching to public REDIS_URL or the raw internal URL
REDIS_URL resolves to 127.0.0.1 Use the actual internal URL instead of the reference variable
REDIS_URL is missing /DB suffix Append /1, /2, /3, /0 as appropriate
URL format is wrong (e.g., just /0) Replace with full URL: redis://default:PASSWORD@HOST:PORT/0

DO NOT apply fixes yet. Report your findings first so we can decide the correct fix together.


Report Format

Please report back with this structure:

## Redis Investigation Report

### Redis Service
- Exists: YES/NO
- Status: ___
- Internal URL: ___
- REDIS_URL value: ___
- REDIS_PRIVATE_URL value: ___

### backend-api (REDIS_URL)
- Variable exists: YES/NO
- Raw value: ___
- Resolved value: ___
- DB suffix: ___

### backend-ai-api (REDIS_URL)
- Variable exists: YES/NO
- Raw value: ___
- Resolved value: ___
- DB suffix: ___

### backend-docs-api (REDIS_URL)
- Variable exists: YES/NO
- Raw value: ___
- Resolved value: ___
- DB suffix: ___

### backend-vitto-api (VITTO_REDIS_URL)
- Variable exists: YES/NO
- Raw value: ___
- Resolved value: ___
- DB suffix: ___

### Deploy Logs
- Most recent Redis message: ___
- Timestamp: ___
- Any successful connections seen: YES/NO

### Recommended Fix
- (Your assessment based on findings)