Hello. We have a project where go was used for 2 purposes:
- Build executor file for our project
- Build helm libraries from helm.sh sources
Project shortly saying is about deploying helm charts. Running of that project is happening using kubernetes job. And issue is that the same job and same image with same parameters, same requests and same limits(basically same job.yaml) in 2/3 k8s clusters works fine. But on third one it’s running into OOM and we want to understand what can cause it. When we’re talking about job:
- Memory Requests and limits are the same values
- CPU requests and limits - slightly different
In actual execution we noticed:
- CPU is throttling in limits, but i believe it’s ok
- Even when limits is 1m(literally the minimum possible) - it’s still normally consuming memory on those 2 clusters
But we noticed that if we disable garbage collector using this:
“debug.SetGCPercent(-1)”
memory consumption increases drastically. So we suspecting that on third environment garbage collector not working as expected
Question is - what are potential k8s environment configurations can affect garbage collector, so it will behave differently on the cluster?
Unfortunately can’t share any source code due to company policy. And debugging on problem environment is not possible.
Any tips and suggestions will be helpful