CPU 100% with workflow running

Hello,

I have self-hosted version 1.33.1

I have this scenario and it seems that after around 20 executions it does not work anymore and the CPU within the digitalocean Docker is 100%

grafik

I have one premium vCPU and 2GB RAM.

I did try on the n8n cloud and got the same issue. At the first 10 loops it seems to run fast and smoth but then after loop 15 getting very slow

it seems to be the HTTP “PD - update Field…” node

It looks like your topic is missing some important information. Could you provide the following if applicable.

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

with run 20 the node stays on “executing node…”

trying on cloud give me this message

grafik

hello @Sebastian1

Seems you have a big amount of data there. You will need to offload the high-consuming part of the workflow into a sub-workflow. I suppose it is that one:

In order to avoid memory overuse, you’ll need to loop it in the main workflow (the one that you are currently using), so in the sub-workflow, it only receives the parameters from the main workflow to get the “next” results. That will allow to release of the memory once the “page” is finished

1 Like

Hi Barn, thank you for your help.

In the screenshot above (console top) it did not look like the RAM was a problem. However I did now 3 subworkflows so in each of those only one Item is used. This works but wonder why and how can this happen. I think there must be something not working properly within n8n. I do not have havy data from at least from my perspective. Or it depends what is heavy data. In that modules just JSON output from one Item.

I can’t believe I’m the only one with that behavior? There must be more people loping over thousands of Items which is sometimes necessary…

What was also interesting for me was that in the first loop CPU got to less then 10% and with every loop it got more and more until it was at 100% and with loop 20 it did stay at 100% and the whole scenario hang.

To me it feels like there could be improvement how n8n handles this.

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