Major memory usage from Worker in self hosted n8n instance on relatively complex workflow execution

Describe the problem/error/question

Major memory usage from Worker in self hosted n8n instance on relatively complex workflow execution.

I have subworkflows set up to handle the heavy lifting, and set nodes to only pass back minimal execution data to the parent workflow yet I still get compounding memory increases over long workflow execution.

I have my instance deployed on railway with 2 replica workers and 2 replica webhook processors.

Memory doesn’t seem to be reclaimed and has led to out of memory errors on a 32gb memory instance.

What is the error message (if any)?

Please share your workflow

Can’t share the full workflow - contains sensitive data. Here is a screenshot

Parent Workflow

Sub Workflow

Share the output returned by the last node

N/A

Information on your n8n setup

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

hello @mxkel

You still have too complex workflows.

Especially the first one with that heavy part