I have a microservices system that has several docker containers.Each one of the containers runs a springboot application. The docker run in centos7. the contain with problem takes about 10% of the host memory (16G) and growing fast as ruing. In the end, the host memory runs out and start to kill container and system collapse. The images of that problematic container is build with springboot jar on top the java8 image. And all configs of springboot embedded tomcat keep the default values.
So my questions are 1) how springboot knows how much memory it's application needs? 2) how docker decides how much memory to give to a container when it's started 3) what can cause a container keep eating up all memory? (already know log is not the issue cause the log file in that container is pretty small) 4) is there a way to force a container to release the memory it holds? 5) if there is a memory leak in application, will the application consume more memory than JVM default value in tomcat?
