My n8n worker node keeps crashing on Railway

Describe the problem/error/question

I have n8n deployed on Railway. It was working fine until I hit my usage limit, and they shut my instance down. Now I can’t seem to get the worker back up without having it crash a few minutes after restarting/redeploying.

What is the error message (if any)?

User settings loaded from: /home/node/.n8n/config

Oct 01 07:01:45

Last session crashed

Oct 01 07:01:57

Error: Worker exiting due to an error.

Oct 01 07:01:57

TypeError: Cannot read properties of undefined (reading ‘subscribe’)

Oct 01 07:01:57

[JobProcessor] Starting job 522 (execution 875)

Oct 01 07:02:07

User settings loaded from: /home/node/.n8n/config

Oct 01 07:02:09

Last session crashed

Oct 01 07:02:20

Found unfinished executions: 875

Oct 01 07:02:20

This could be due to a crash of an active workflow or a restart of n8n.

Oct 01 07:02:20

Currently active workflows:

Oct 01 07:02:20

  • My Today v2 - create tomorrow (ID: 8ssJPegdqwv2hRUz)

Oct 01 07:02:20

  • My Today (ID: U6QrHG15fhm3BHq0)

Oct 01 07:02:20

  • My Today v2 - create today (ID: Uo42WFEAkbikxc3g)

Oct 01 07:02:20

[Recovery] Logs available, amended execution

Oct 01 07:02:20

Error: Worker exiting due to an error.

Oct 01 07:02:20

TypeError: Cannot read properties of undefined (reading ‘subscribe’)

Please share your workflow

No issues with the workflows themselves

Share the output returned by the last node

N/A

Information on your n8n setup

  • n8n version: 1.60.1
  • Database (default: SQLite): Postgres, Redis
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
  • Operating system: Railway

Hi @ckmoocow,

Did you make any changes to your active workflows since you got the instance back up after it having been shut down?

Have you reached out to Railway about this? Seems mainly to be a deployment issue

I haven’t made any changes. I did contact Railway first, and they said they won’t support 3rd party apps.

This somehow sounds like a permissions issue?

I’m not able to see those Railway links, can you please share the deploy logs through elsewhere? Can you copy paste them into a code block in here?

Thanks

The timestamps don’t really link to much more info:

Here’s my Railway setup:

Currently active workflows:

- My Today v2 - create tomorrow (ID: 8ssJPegdqwv2hRUz)

- My Today (ID: U6QrHG15fhm3BHq0)

- My Today v2 - create today (ID: Uo42WFEAkbikxc3g)

[Recovery] Logs available, amended execution

Error: Worker exiting due to an error.

TypeError: Cannot read properties of undefined (reading 'subscribe')

User settings loaded from: /home/node/.n8n/config

Last session crashed

Found unfinished executions: 875

This could be due to a crash of an active workflow or a restart of n8n.

Currently active workflows:

- My Today v2 - create tomorrow (ID: 8ssJPegdqwv2hRUz)

- My Today (ID: U6QrHG15fhm3BHq0)

- My Today v2 - create today (ID: Uo42WFEAkbikxc3g)

[Recovery] Logs available, amended execution

Error: Worker exiting due to an error.

TypeError: Cannot read properties of undefined (reading 'subscribe')

User settings loaded from: /home/node/.n8n/config

Last session crashed

Error: Worker exiting due to an error.

TypeError: Cannot read properties of undefined (reading 'subscribe')

User settings loaded from: /home/node/.n8n/config

Last session crashed

Error: Worker exiting due to an error.

TypeError: Cannot read properties of undefined (reading 'subscribe')

[JobProcessor] Starting job 522 (execution 875)

User settings loaded from: /home/node/.n8n/config

Last session crashed

Found unfinished executions: 875

This could be due to a crash of an active workflow or a restart of n8n.

Currently active workflows:

- My Today v2 - create tomorrow (ID: 8ssJPegdqwv2hRUz)

- My Today (ID: U6QrHG15fhm3BHq0)

- My Today v2 - create today (ID: Uo42WFEAkbikxc3g)

[Recovery] Logs available, amended execution

Error: Worker exiting due to an error.

TypeError: Cannot read properties of undefined (reading 'subscribe')

User settings loaded from: /home/node/.n8n/config

Last session crashed

Found unfinished executions: 875

This could be due to a crash of an active workflow or a restart of n8n.

Currently active workflows:

- My Today v2 - create tomorrow (ID: 8ssJPegdqwv2hRUz)

- My Today (ID: U6QrHG15fhm3BHq0)

- My Today v2 - create today (ID: Uo42WFEAkbikxc3g)

[Recovery] Logs available, amended execution

Error: Worker exiting due to an error.

TypeError: Cannot read properties of undefined (reading 'subscribe')

User settings loaded from: /home/node/.n8n/config

Last session crashed

Error: Worker exiting due to an error.

TypeError: Cannot read properties of undefined (reading 'subscribe')

User settings loaded from: /home/node/.n8n/config

Last session crashed

Error: Worker exiting due to an error.

TypeError: Cannot read properties of undefined (reading 'subscribe')

User settings loaded from: /home/node/.n8n/config

Last session crashed

Error: Worker exiting due to an error.

TypeError: Cannot read properties of undefined (reading 'subscribe')

User settings loaded from: /home/node/.n8n/config

Last session crashed

Error: Worker exiting due to an error.

TypeError: Cannot read properties of undefined (reading 'subscribe')```

I have the same issue… :confused:

We don’t officially support Railway but looking at that error I suspect the issue is likely to be with the connection to the Redis instance, Can you make sure you have the environment options correctly set