Problems running Java Application in Docker

3

I have the following problem.

I created a container with 1GB of memory and 16GB of Swap, I'm using Oracle JDK 8 Update 171 (64bit) with Debian 9.

Set the Java_OPTS parameters for the JVM to read CGROUPS.

The container is rising correctly with the parameters I passed. Inside the container I can upload my Springboot application twice (02 processes), one with 08GB (XMS and XMX) and the other with 7GB (XMS and XMX) without problems.

So I understand in the container I have 01GB RAM + 14GB SWAP = 15GB total.

But when I try to upload only one application with 9 or 10GB (XMS and XMX), the application does not over and it generates the file hs ... informing me that it can not allocate memory.

How can I upload 02 processes with 15GB (8 + 7), but not on 01 process with 09GB ????

I've tried increasing RAM to 10GB and 6GB swap. I already configured reserved memory, but nothing worked.

I tested the same application in a Debian out of the container, and Debian has 1GB (RAM) and 16GB Swap and managed to upload it with 12GB XMX.

Can you help me?

    
asked by anonymous 06.08.2018 / 22:20

0 answers