Kubernetes - Increase meteor/node memory limit

5/14/2018

I'm running a kubernetes cluster and one microservice is constantly crashing with exitCode 134. I already changed the resource memory limit to 6Gi

resources: {
 limits: {
  memory: "6Gi"
 }
}

but the pod never goes above 1.6/1.7Gi.

What may be missing?

-- Miguel Morujão
kubernetes
meteor
node.js

1 Answer

5/14/2018

It's not about Kubernetes memory limit. Default JavaScript Heap limit is 1.76GB when running in node (v8 engine).

The command-line in Deployment/Pod should be changed like node --max-old-space-size=6144 index.js.

-- silverfox
Source: StackOverflow