4 months ago
Hi,
I'm experiencing a persistent connectivity issue between my Node.js worker service (nlt-ws-worker
) and my Redis service (Redis
) within the same project, deployed in the Southeast Asia region.
My Node.js worker uses ioredis
to connect to Redis. When configured to use the private network URL (redis://default:<YOUR_REDIS_PASSWORD>@redis.railway.internal:6379
), the connection consistently fails. The worker logs show repeated Redis client reconnecting...
messages, followed by a fatal error when attempting to ping
the Redis server:
FATAL: Failed to initialize or connect to Redis. Worker cannot start. stack: MaxRetriesPerRequestError: Reached the max retries per request limit (which is 3). Refer to "maxRetriesPerRequest" option for details. at Socket.<anonymous> (/app/node_modules/ioredis/built/redis/event_handler.js:182:37) ... (rest of stack trace)
We've tried adjusting connection timeouts (connectTimeout: 10000
), adding delays before the initial ping, and simplifying the ioredis
connection options within the worker code, but the issue persists when using the private URL.
Crucially, when I temporarily switched the REDIS_URL
environment variable in my worker service to use the public proxy URL (redis://default:...@turntable.proxy.rlwy.net:35048
), the connection works flawlessly. The worker connects immediately, the ping succeeds, and the application runs as expected.
This strongly suggests the issue is specific to the private network communication path or DNS resolution for redis.railway.internal
between these two services within the Southeast Asia region for my project.
Could you please investigate the private network connectivity between my nlt-ws-worker
service and the Redis
service?
1 Replies
4 months ago
Hello,
There is nothing wrong with the private network connection, instead, please see our docs on this topic -
https://docs.railway.com/dynamic/reference/errors/enotfound-redis-railway-internal
Best,
Brody
Status changed to Awaiting User Response Railway • 4 months ago
Status changed to Solved brody • 4 months ago