How can I change the memory limit in n8n?

Hello! I need help with change the limit size of memory of n8n in code? What folder I need acess to find the file to change te memory limit?
In the first picture I’m showing the file system of my version that it is in second picture.

Can someone help me?

Hey @Viniciusmq107,

It doesn’t really work that way, we run on nodejs but the memory limit may vary depending on how you deploy n8n.

You can find some of the node options you can set here: Command-line API | Node.js v19.0.0 Documentation

I think the option you would need is max old space size.

I saw this function of max old space in other answer in n8n community, bus I do not know exactly set this option in files of n8n. Do you know?

Hey @Viniciusmq107,

It isn’t something you would set in one of the n8n files it looks like it is an environment option you would need to set before launching n8n a bit like the other options that need to be set like WEBHOOK_URL


We had the same problem with a workflow needing more memory, if you use Docker u can set the


(8000 MB)
environment variable in your Docker-Compose

1 Like