N8N MAIN INSTANCE AND N8N WORKER CRASHED
ricardojusti
HOBBYOP

2 months ago

Hi everyone! I need your help.

My N8N is constantly showing a connection failure.

I reset Redis, but the problem persists.

Here's a screenshot of the situation.

Thank you all!

Attachments

$10 Bounty

3 Replies

Railway
BOT

2 months ago

Your n8n main instance and n8n worker are both crashing because they lose their connection to Redis (repeated ECONNRESET errors) and after failing to reconnect within 10 seconds, the n8n process exits. Your Redis service shows as online, so this appears to be a connectivity issue between n8n and Redis rather than Redis being completely down. Since n8n uses ioredis internally, you may need to append ?family=0 to your REDIS_URL to enable dual-stack DNS resolution as described in our library configuration docs, and you should also verify that your Redis service is not running out of memory or being restarted by checking its logs and resource usage in the metrics tab.


Status changed to Awaiting User Response Railway 2 months ago


Railway

Your n8n main instance and n8n worker are both crashing because they lose their connection to Redis (repeated ECONNRESET errors) and after failing to reconnect within 10 seconds, the n8n process exits. Your Redis service shows as online, so this appears to be a connectivity issue between n8n and Redis rather than Redis being completely down. Since n8n uses ioredis internally, you may need to append `?family=0` to your `REDIS_URL` to enable dual-stack DNS resolution as described in our [library configuration docs](https://docs.railway.com/networking/private-networking/library-configuration), and you should also verify that your Redis service is not running out of memory or being restarted by checking its logs and resource usage in the metrics tab.

ricardojusti
HOBBYOP

2 months ago

I need step-by-step instructions on how to modify and insert family=0.
Should I insert family=0 in both the n8n main instance and n8n worker containers?

If these variables don't exist in these containers, how do I create them?

Status changed to Awaiting Railway Response Railway 2 months ago


Status changed to Open sam-a 2 months ago


domehane
FREE

2 months ago

Hello ricardo,

go to your n8n main instance service, click the variables tab, find the variable you're using to connect to redis, and add ?family=0 at the end of its value. then do the exact same thing in your n8n worker variables tab. save and let both services redeploy. this fixes how ioredis resolves the redis hostname on railway's private network

Hope this help you :)


Welcome!

Sign in to your Railway account to join the conversation.

Loading...