n8n-io / n8n

Free and source-available fair-code licensed workflow automation tool. Easily automate tasks across different services.
https://n8n.io
Other
41.28k stars 5.18k forks source link

K8s worker Stats #9288

Closed Dasio closed 4 days ago

Dasio commented 2 weeks ago

Bug Description

When I look at individual worker stats, it displays stats about the whole node, instead of container one. So e.g. I see Free Memory: 55.54GB / 62.81GB. Which is for whole node

To Reproduce

  1. Go to Settings -> Workers
  2. Look e.g. at Free Memory

Expected behavior

I expect to see actual Pod usage/limits.

Check cgroup v2

Operating System

Alpine Linux v3.19

n8n Version

1.39.1

Node.js Version

v18.19.1

Database

PostgreSQL

Execution mode

queue

netroy commented 2 weeks ago

This is working as currently implemented. n8n Worker stats simply report the data that is available to the node.js process using the os module.

While it'd be great to get this data from cgroups v2, and then also use that to optimize the max heap-size, unfortunately this won't be doable until we drop support for node.js 18.

Joffcom commented 4 days ago

As this is not currently seen as a bug I am going to move this to closed for now.