Deployment crashed for Worker
Anonymous
HOBBYOP

9 months ago

Hi Railway Support Team,

I’m encountering a recurring crash in my N8N deployment (both the Primary and Worker services) hosted on Railway. In the deploy logs, I see a continuous stream of messages like:

Exiting process due to Redis connection error

This begins immediately after startup and repeats every 20–30 seconds, causing both containers to crash. I’m currently using your managed Redis instance (19 hours up via Docker), and I’ve confirmed that the connection URL and credentials in my REDIS_URL environment variable match the values shown in the Railway dashboard.

Could you help me diagnose why N8N is unable to connect to Redis? Is there a Redis configuration or network policy on Railway that I need to adjust? Any guidance you can provide to restore a stable connection would be greatly appreciated.

Thank you,
Bruna Caroline

$10 Bounty

6 Replies

medim
MODERATOR

9 months ago

Hey! How's it going?
It seems that you're connecting using the private URL... N8N does not support connecting to Redis via the private network due to misconfigurations in the upstream ioredis package that N8N uses internally.

You should use the REDIS_PUBLIC_URL instead!


medim

Hey! How's it going? It seems that you're connecting using the private URL... N8N does not support connecting to Redis via the private network due to misconfigurations in the upstream ioredis package that N8N uses internally.You should use the REDIS_PUBLIC_URL instead!

Anonymous
HOBBYOP

9 months ago

Thank you for the tip! Just to confirm—should I add the REDIS_PUBLIC_URL here, under VariablesNew Variable in my Railway service settings? And then set its value to the public Redis URL shown in the dashboard? And should this variable be added to the Worker service, the Primary service, or both?


medim
MODERATOR

9 months ago

It shouldn't be a new variable! I think there's a misunderstanding here...
Before we proceed, are you perhaps using one of Railway Marketplace templates? There are some 1-click-deploy templates there!

If you are already using one, could you please link it here? So I can check it out.

And one last thing, is this a fresh deploy (e.g you haven't used it yet or the data stored doesn't matter)? We can always start over with a template!


Anonymous
HOBBYOP

9 months ago

Hi!

I didn’t start from one of the Railway Marketplace templates—I deployed my own N8N Git repo directly. Here’s the link to the repo I’m deploying: https://primary-production-ae5b5.up.railway.app/
This isn’t a fresh trial deploy, and I have existing workflows and data in my Postgres database that I need to preserve. That said, I’m happy to start over from a clean slate if that’s easier—but ideally I’d like to keep my current data.

Let me know if that helps clarify, and thank you again for your patience! I’m attaching full screenshots of the error for your reference.


Anonymous
HOBBYOP

9 months ago

Hello?


medim
MODERATOR

9 months ago

Sorry for the late response! Please remember that you're on the hobby plan, which only includes access to community support without guaranteed response times. It's all from the dizzy emoji community dizzy emoji.

Based on your screenshots, it seems you're using a template from the Marketplace. Have you changed any environment variables since deploying the template? If not, I suggest trying to redeploy the crashed services to see if that resolves the issue.

If you did change any environment variables, please check my attached image and verify if the Redis-related environment variables of your Worker and Primary service match the screenshot. Remember that since they're reference variables, clicking the eye icon will show the reference value instead of the reference variable itself. You would need to click the edit button to see which variable it references.

Attachments


Loading...