4

I am using marathon to deploy my docker containers with memory limits specified in marathon specs which looks like :

{
  "id": "<name>",
  "cmd": null,
  "cpus": 2,
  "mem": 4096,
  "disk": 30720,
  "instances": 1,
  "container": {
    "docker": {
      "image": "<docker-image>",
      "network": "HOST",
      "privileged": true,
      "forcePullImage": true
    },
    "requirePorts": true,
    "ports": [<port>],
    "type": "DOCKER"
  }
}

But after running for about 2-3 hours it encounters out of memory issue and OOM killer kills few tasks but leads to my server being in completely frozen state. I can't ssh or access any service on it. It is required to completely restart machine from that state to make it work normally.

I checked syslog and they appear to be as :

enter image description here

My question is how to avoid this? What can be done to prevent from this occurring?

t6nand
  • 710
  • 1
  • 8
  • 20
  • Does this also happen when you launch it via `docker run …`? – Michael Hausenblas May 15 '16 at 13:28
  • 1
    I haven't tried it with docker run for that long. Will try and let you know. – t6nand May 15 '16 at 13:48
  • I started my docker container using docker run command and it is working fine for about more than 14 hours now. But it froze my server thrice when deployed from marathon within 2-3 hours of running. – t6nand May 16 '16 at 04:22
  • Interesting. Just to make sure that we're on the same page: you did run the Docker command with the same set of arguments, right? For example, in the Marathon app spec you've limited the memory to 4096MB, so you did `docker run -m 4096 …`, yes? – Michael Hausenblas May 16 '16 at 05:54
  • Well my spec here have random values. I am using maximum offered memory made available by mesos-slave which is definitely less than the total installed RAM. And docker run is being used normally without specifying memory. – t6nand May 16 '16 at 06:16
  • Can you join chat.dcos.io pls, this seems more like an interactive debug session ;) – Michael Hausenblas May 16 '16 at 07:41

0 Answers0