Is your feature request related to a problem? Please describe.
We've noticed that if we run mongodb_exporter on Rancher Desktop (windows) with the latest WSL kernel( 6.18.33.2-microsoft-standard-WSL2), exporter tends to require a lot more memory and easily gets OOMKilled.
Some debugging sessions and searching found that go kind-of support cgroupsv1 but does not (and might not in the future) support cgroupv2 at all, resulting in GOMEMLIMIT being the machine limit instead of the pod limit.
This results in mongodb_exporter being unreliable in k8s - we still have time as most cloud providers don't yet run on a recent enough kernel and support for Ubuntu 26.04 (which includes a kernel without cgroups1) has not gotten too much traction yet - but that's going to happen soon.
Describe the solution you'd like
Workaround is to manually set GOMEMLIMIT to a value that corresponds to slightly under the pod memlimit - lots of manual work and lots of experimentation necessary for every deployer.
Another solution is using https://github.com/KimMachineGun/automemlimit - i found this in the grafana sources and docs, which is supposed to solve the problem automatically and allows the developer to set limt that works with the application.
Describe alternatives you've considered
The alternative I see is documenting the problem and asking everyone to add the GOMEMLIMIT env variable. Helm chart users might have the advantage of someone generating a templated version for it.
Additional context
Add any other context or screenshots related to the feature request here.
Is your feature request related to a problem? Please describe.
We've noticed that if we run mongodb_exporter on Rancher Desktop (windows) with the latest WSL kernel( 6.18.33.2-microsoft-standard-WSL2), exporter tends to require a lot more memory and easily gets OOMKilled.
Some debugging sessions and searching found that go kind-of support cgroupsv1 but does not (and might not in the future) support cgroupv2 at all, resulting in GOMEMLIMIT being the machine limit instead of the pod limit.
This results in mongodb_exporter being unreliable in k8s - we still have time as most cloud providers don't yet run on a recent enough kernel and support for Ubuntu 26.04 (which includes a kernel without cgroups1) has not gotten too much traction yet - but that's going to happen soon.
Describe the solution you'd like
Workaround is to manually set GOMEMLIMIT to a value that corresponds to slightly under the pod memlimit - lots of manual work and lots of experimentation necessary for every deployer.
Another solution is using https://github.com/KimMachineGun/automemlimit - i found this in the grafana sources and docs, which is supposed to solve the problem automatically and allows the developer to set limt that works with the application.
Describe alternatives you've considered
The alternative I see is documenting the problem and asking everyone to add the GOMEMLIMIT env variable. Helm chart users might have the advantage of someone generating a templated version for it.
Additional context
Add any other context or screenshots related to the feature request here.