1 minute read

Tips

Data Propagation from the Previous Nodes

f-string format tips

Execution Concurrency Control

Issues

Timeout of AI Nodes

Node.js consumes 100% CPU

Debugging

$ docker stats --no-stream --no-trunc
CONTAINER ID                                                       NAME                 CPU %     MEM USAGE / LIMIT     MEM %     NET I/O           BLOCK I/O   PIDS
9df76eab62201e9ea911b4940e8988658fa9794dadb7f103dac6cbcac4b8ed6c   beautiful_brattain   0.01%     240.5MiB / 3.755GiB   6.25%     3.46MB / 1.67MB   0B / 0B     27
71ed91ae1306bcdc0315721ea05d1c7140fd0dbfdfddd8115d40aa4e10f99981   n8n                  99.93%    507.4MiB / 3.755GiB   13.20%    166MB / 77.9MB    0B / 0B     13

$ docker exec -it n8n cat /sys/fs/cgroup/memory/memory.limit_in_bytes
9223372036854771712

$ docker exec -it n8n node --version
v20.19.0

$ docker exec -it n8n ps ux
PID   USER     TIME  COMMAND
    1 node      0:04 tini -- /docker-entrypoint.sh
    7 node      7h03 node /usr/local/bin/n8n
   53 node      0:00 ps ux

According to the Dockerfile and other referred files, n8n/docker/images/n8n/Dockerfile at master · n8n-io/n8n - https://github.com/n8n-io/n8n/blob/master/docker/images/n8n/Dockerfile

Seems like we can pass the NODE_OPTIONS environment variable.

e.g. -e NODE_OPTIONS='--max-old-space-size=1024'

Others

Updated: