There are some options to control application memory consumption.
Docker has a couple of flags to control application inside the container.
- –memory flag defines non swap memory limit
- –memory-swap flag defines total memory limit (swap + non swap memory) Details can be found here
Moreover, there is a cgroups limit at the os level. To check it
When you try to check is, in some situations you can see some huge magic number
cat /sys/fs/cgroup/memory/memory.limit_in_bytes 9223372036854771712
This is a maximum 64-bit signed integer rounded to the nearest page Source