Decrease memory consumption

Hello everyone!

What could I do to decrease memory consumption in my self-hosted n8n server?

Currently I have a workflow that make multiple HTTP Requests splitted in batches, but in each batch the memory consumption keep growing, I’ve reduced the Code nodes but with no success.

My server contains these configs:
32GB RAM
12vCPUS

image

Information on your n8n setup

  • **n8n version:1.55.3
  • **Database (default: SQLite):SQLite
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • **Running n8n via (Docker, npm, n8n cloud, desktop app):npm
  • **Operating system:Linux

Hi @Hnk ,

Splitting the payload in batches and reducing the code nodes was a good call! Have you also tried splitting the workflow into smaller sub-workflows instead of one full one?

Could also try making sure this wf’s execution doesn’t coincide with others running, go give your set up a bit more air to process this heavier task.

You can see some more best practises on managing workflow memory consumption here - Memory-related errors | n8n Docs. And, just in case, on managing data retention here - Execution data | n8n Docs

Let us know how you get on! :dizzy:

2 Likes

Hi Mariana,

Thank you for your reply.

I haven’t tried splitting the workflow, I’m going to explore that.

That looks like a memory leak. Does the memory usage ever come down? or does it just keep growing?

When the execution ends, it goes down