Bad memory leak using only a webhook and a code node

Describe the problem/error/question

What is the error message (if any)?

I’m running “n8n start” using pm2, to make it run in the background. Is this the only way I can run it daemonized, from a command line?

When I FIRST start n8n with pm2, the memory usage is 15.2 mb. Within about 10 minutes, it quickly and continuously grows to 300 mb and continues to climb until it crashes the server. Any idea why?

Please share your workflow

Share the output returned by the last node

Information on your n8n setup

  • n8n version: 0.224.4
  • Database (default: SQLite): SQLite
  • n8n EXECUTIONS_PROCESS setting (default: own, main): default
  • Running n8n via (Docker, npm, n8n cloud, desktop app): npm using pm2
  • Operating system: CentOS

Trying daemonize instead, will let you know how that goes…

I would expect some growth but it shouldn’t crash, when it crashes what does the log say?

I have not seen any other reports like this for that version, if you get a chance can you share the config you are using for n8n and the pm2 command you are running?

1 Like

Interesting, generally does 15MB in the beginning also sound very strange. Should use already more from the beginning. Apart from that had just a 30 second look but it seems like you constantly open new database connections but you never close them. So maybe related to that.

I have no idea what’s doing that. I tried completely turning off n8n and that was STILL happening. Definitely something else on the same server but I have no idea what.

Thanks a lot for the update and for making clear that it is not related to n8n.

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