Symfony service can't connect to Redis Service
dintech-rappy
HOBBYOP

3 months ago

All of a sudden my symfony can't connect to redis, and it times out.

Failed to fetch key "cognito_jwks": Redis connection failed: Operation timed out

Failed to fetch key "cognito_jwks": Redis connection failed: Operation timed out

Failed to save key "cognito_jwks" of type array: Redis connection failed: Operation timed out

Failed to fetch key "cognito_jwks": Redis connection failed: Operation timed out

Failed to fetch key "cognito_jwks": Redis connection failed: Operation timed out

Failed to save key "cognito_jwks" of type array: Redis connection failed: Operation timed out

Failed to fetch key "cognito_jwks": Redis connection failed: Operation timed out

I'm connecting to redis via env var, REDIS_URL = redis://default:TqGoxQuoQDfVASdiiyqpNieaNutwFnLN@redis.railway.internal:6379?persistent=1&timeout=2

Is this a redis issue or something else?

Thanks in advance!

$10 Bounty

Pinned Solution

dintech-rappy
HOBBYOP

3 months ago

If I copy the SSH Command, I can connect.

railway ssh --project=0822ff25-876b-46c3-b045-fe9b669f35c6 --environment=0143e931-2a1f-4298-9bb1-1dd448d2d043 --service=06c99491-1123-4203-9e00-93b48ec2a53f

✓ Connected to interactive shell

root@85b22a98c120:/data# ls

dump.rdb

I guess this means redis is not down, just inaccessible to my symfony service?

6 Replies

Railway
BOT

3 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!


dintech-rappy
HOBBYOP

3 months ago

If I copy the SSH Command, I can connect.

railway ssh --project=0822ff25-876b-46c3-b045-fe9b669f35c6 --environment=0143e931-2a1f-4298-9bb1-1dd448d2d043 --service=06c99491-1123-4203-9e00-93b48ec2a53f

✓ Connected to interactive shell

root@85b22a98c120:/data# ls

dump.rdb

I guess this means redis is not down, just inaccessible to my symfony service?


dintech-rappy
HOBBYOP

3 months ago

The issue happened again today, after a deploy. But nothing I changed was related to cache or redis. It just starts timing out out of the blue.

This is really worrying since I plan on hosting my production app on here, but I can't do that knowing that the connection to Redis can get screwed up randomly like this.


dintech-rappy
HOBBYOP

3 months ago

A complete redeploy of the symfony service seems to have fixed it. The question remains, why does it happen in the first place? The redeploy had 100% exact content, no changes were done.


Status changed to Solved noahd 3 months ago


dintech-rappy
HOBBYOP

3 months ago

This happened again after a deploy. The connection to Redis keeps timing out. What is going on?


Status changed to Awaiting Railway Response Railway 3 months ago


dintech-rappy
HOBBYOP

3 months ago

I think the issue was the "persistent=1" in the URL. I removed it and now am monitoring, leaving all this info for the people who may run into this issue like me.


Loading...