Score:0

node in docker in aws instance is running out of memory, why?

us flag

My NodeJS application is running inside a docker container on an ec2 instance. It is running out of memory way before the server itself is running out of memory. The container is only able to use around 25% of the memory. But why?

The following mechanisms seem not to be the cause:

  • ulimit returns unlimited.
  • cat /sys/fs/cgroup/memory/docker/memory.limit_in_bytes returns 9223372036854771712

I am running docker without any limiting flags

asktyagi avatar
in flag
Host ulimit and container limit are different also docker use cgroup slice to control the limits. Kindly add appropriate details.
us flag
i added the cgroup information. anything else?
Score:0
in flag

Though you haven't provided docker container limits like how you are running container along with parameters, you can refer to this page https://docs.docker.com/config/containers/resource_constraints/ specifically memory related parameters listed here https://docs.docker.com/config/containers/resource_constraints/#limit-a-containers-access-to-memory

us flag
haven't used any of those flags, by default everything should be unlimited, right?
asktyagi avatar
in flag
nope, container mean cgroups which si coming with limit big no no unlimited stuff, as container meant for different purpose.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.