HELP: Workflow >2h with queues & workers STILL fails on timeout. What am I missing?

Describe the problem/error/question

Hi Community,

I’m genuinely at my wit’s end with a long-running workflow and I’m hoping someone here has an idea, because I have officially run out of them.

The Setup:

• A main workflow that executes three sub-workflows sequentially.

• Each sub-workflow takes over 40 minutes to run.

• The total execution time is therefore over 2 hours.

The Problem:

The main workflow consistently dies, and I’m 99% sure it’s a timeout issue somewhere in the stack. The problem is, I can’t figure out where. The execution just stops without a clear, traceable error pointing to the source of the timeout.

This is not a simple setup issue. Here is what I have already done:

1. Database Upgrade: I migrated from the default SQLite to a dedicated PostgreSQL instance, thinking it was a database bottleneck or connection issue. The problem persists.

2. Configured Timeouts: I have set N8N_EXECUTION_TIMEOUT to a very high value (-1 or 10800 for 3 hours) in my environment variables. This had no effect.

3. Implemented a Full Queueing System: This is the most frustrating part. I set up a proper production-grade environment with dedicated workers and Redis for queueing, specifically to handle long-running and concurrent executions. Even with this setup, where the main workflow should just wait for the queued sub-workflows to finish, it still fails.

The damn thing just refuses to run to completion, and I’m starting to think the timeout is not within n8n itself but somewhere else in the infrastructure.

My Desperate Question:

Given that I’ve already implemented workers, queues, and a robust database, what other component could be killing my workflow? Is it the reverse proxy (I’m using [Dein Reverse Proxy, z.B. Nginx, Traefik])? A hidden timeout in Docker? A load balancer? A firewall terminating long-lived connections?

How can I even debug this further to find the actual source of the timeout?

I’m losing my mind over this. Any advanced insight or suggestion on where to look next would be massively appreciated.

Information on your n8n setup

  • n8n version: 1.114.4
  • Database (default: SQLite): PostgreSQL
  • n8n EXECUTIONS_PROCESS setting (default: own, main):main
  • Running n8n via (Docker, npm, n8n cloud, desktop app):Docker, NGINX
  • Operating system:Debian (VM hosted with Proxmox)

Hey @muse83,

Are you seeing any errors in the execution log or does it show success? It could be that one of the sub workflows is not returning data on all paths or there is a loop somewhere.

If you are seeing that the execution failed do you an error message in the execution log and do the logs show anything?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.