redis connection error in judge0 template
proacademy23
PROOP

3 months ago

I've deployed a template named judge0 and everything went smooth when deploying, but when trying to use the server and hit the /submissions endpoint I always get a 500 error, other endpoints, like /docs and /about, work as expected (they don't use redis), but this mentioned shows in logs:
Redis::CannotConnectError (Error connecting to Redis on localhost:6379 (Errno::ECONNREFUSED)):
although all env variables are set on startup and redis password is filled.

$10 Bounty

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


fra
HOBBY

3 months ago

did you add the redis envs? looking the redis host it seems wrong, it shouldn't be localhost.

You can find the env in the redis service in the variables tab


Anonymous
HOBBY

3 months ago

you should use either REDIS_PUBLIC_URL or REDIS_URL env variable value (you can find it inside redis service variables tab)


proacademy23
PROOP

3 months ago

im currently using the judge0 template on railway and i tried using both the REDIS_PUBLIC_URL and REDIS_URL on the worker redis container variable but still i get status 500 with the same error


Loading...