Workflow timeout after 2h when set to 4h

Describe the problem/error/question

I have an n8n workflow that is taking a long time to run, as it has to Loop and call a sub-workflow 80 times, and I have many “waits” so that Google Sheets doesn’t complain.

I have the workflow set with a timeout of 4 hours.

I got a VPS in which i got portainer and n8n installed via portainer. The config file has several variables that define timeouts, which are these (in all services: worker, editor, and webhook):

  • Maximum default execution time (In seconds)

    • EXECUTIONS_TIMEOUT=3600 (1 hour)
  • Maximum execution time to set in an individual workflow (In seconds)

    • EXECUTIONS_TIMEOUT_MAX=86400 (24 hours)

So, by default, workflows would timeout after 1 hour of execution, provided you haven’t defined another timeout in the workflow itself. And the maximum a workflow can run is 24 hours.

The problem: My workflow, which is set to timeout after 4 hours, gives a timeout when it reaches 2 hours of execution.

Just a bit more information: the subworkflow, when executed, will always return only one item.

I have tried several things:

  • Modifying and saving the timeout again.

  • Creating a new workflow and moving the content to it, setting the timeout, and running it.

  • Restarting the n8n service.

None of this has worked, the workflow stops at 2 hours.

Has this happened to anyone else? Any idea how I can solve this?

Thank you very much for your help, best regards,

Javi

What is the error message (if any)?

Just the timeout

Please share your workflow

Share the output returned by the last node

Information on your n8n setup

  • n8n version: 1.119.1
  • Database (default: SQLite): postgress
  • n8n EXECUTIONS_PROCESS setting (default: own, main): default
  • Running n8n via (Docker, npm, n8n cloud, desktop app): docker
  • Operating system: ubuntu server

This sounds like there might be an additional timeout setting that’s overriding your workflow-specific timeout. Here are a few things to check:

• **Check your reverse proxy settings** - If you’re using nginx, Apache, or Cloudflare in front of n8n, they often have their own 2-hour timeout limits that could be cutting off your workflow

• **Verify Docker/Portainer limits** - Look for any timeout configurations in your Docker compose file or Portainer stack settings that might be limiting container execution time

• **Test with a simpler workflow** - Create a basic workflow with just a Wait node set to 3+ hours to see if the 2-hour limit affects all workflows or just complex ones

• **Check n8n logs** - Look at the n8n container logs around the 2-hour mark to see what’s actually causing the timeout (whether it’s n8n itself or an external service)

The fact that it’s consistently 2 hours suggests there’s a hard limit somewhere in your infrastructure stack rather than n8n’s workflow timeout settings.