Hello n8n Community,
I’m running into a persistent issue with my self-hosted n8n cluster on Railway and would greatly appreciate any insights or suggestions.
Setup:
-
Platform: Railway
-
n8n Version:
1.116.1 -
Mode: Clustered Queue Mode
-
Services:
n8n-master,n8n-worker,n8n-whp,n8n-redis,n8n-pg(PostgreSQL)
Problem:
Workflows triggered via Webhook immediately get stuck in the “Queued” status and never execute. They eventually time out.
However, workflows triggered manually (e.g., using the Manual Trigger node) execute successfully and instantly.
This occurs even with the simplest possible webhook workflow: Webhook → Respond to Webhook.
Key Findings & Logs:
-
The
n8n-whpservice logs correctly show “Enqueued execution (job XX)” when a webhook request is received. -
The
n8n-workerservice logs show NO activity related to picking up or processing these jobs. Crucially, the worker’s startup logs show no attempt to connect to Redis or initialize the BullMQ queue system. -
The
n8n-redisservice logs are clean and show normal operation (background saves, etc.) with no errors. -
The
n8n-masterlogs show no relevant errors during webhook triggering.
Troubleshooting Steps Already Taken:
I have meticulously checked and confirmed the following configurations based on n8n docs and Railway support suggestions:
-
Resources: Verified sufficient CPU/Memory on
master(1vCPU/2GB) andworker(4vCPU/8GB). Metrics do not show maxing out. -
Execution Mode: Confirmed
EXECUTIONS_MODE=queueis set onmaster,worker, andwhp. -
Worker Process Config:
-
Confirmed
EXECUTIONS_PROCESS=mainis set onworker. -
Added
N8N_PROCESS_TYPE=workerspecifically to theworker.
-
-
Redis Connection:
-
Triple-checked
QUEUE_BULL_REDIS_HOST,PORT,PASSWORD,USERNAMEonmaster,worker,whp. Confirmed they exactly match then8n-redisservice details and use the internal Railway hostname. -
Confirmed
QUEUE_BULL_REDIS_DUALSTACK=trueis set onmaster,worker,whp.
-
-
Queue Name: Explicitly set
QUEUE_BULL_NAME=n8n_queueonmaster,worker,whp. -
Master Config: Confirmed
N8N_DISABLE_PRODUCTION_MAIN_PROCESS=trueis set onmaster. -
Redeployments: All services have been redeployed multiple times after configuration changes.
Conclusion & Question:
Despite all configurations appearing correct for queue mode, the n8n-worker is simply not attempting to connect to Redis to dequeue jobs when triggered via webhook. It seems like an initialization issue specific to the worker in queue mode within the Railway environment.
Has anyone encountered a similar issue with n8n clusters on Railway where the worker fails to initialize its queue connection? Are there any other environment variables or specific Railway settings I might be missing?
Any help or pointers would be greatly appreciated!
Thank you.