I'm running a container which includes a J2EE webapp with tomcat docker base image on CoreOS server instance in AWS (t2 medium). Recently I came across on how exceeding memory limits in Docker containers using Java inside would make the containers fail (Resource). After reading the above article I was bit concerned on whether any of containers that I'm running on my CoreOS instance would face this issue in the future.
So I wanted to find out on what would be the default memory limit for a Docker container when no memory limit specified on docker run command, which is the way I'm running my docker containers. As discussed in this forum the answer stated its unlimited and its based on whatever the OS gives it.
But I want to know how CoreOS decides the memory limit for a given container in detail and should I be worried on setting up a memory limit and CPU utilization of a container which is running a webapp with tomcat base image (Will there be any chance that a container exit due to memory overload issue in CoreOS?).
None of the documents I came across on the internet provided a clear answer related to CoreOS or tomcat docker image, for this issue.
Note - I'm managing my Docker containers via systemd.