For my application, the memory used by the Java process is much more than the heap size.
The system where the containers are running starts to have memory problem be
How to size correctly the Docker memory limit? Check the application by monitoring it for some-time. To restrict container's memory try using -m, --memory bytes option for docker run command - or something equivalant if you are running it otherwise like
docker run -d --name my-container --memory 500m
can't answer other questions.