Category: Docker

docker-compose vs. CPU limit

That was a painfull learning today 🙁 Best is to blog about it now, so hopefully somebody reads this before (or during) troubleshooting a similar issue.

What happened?

My home server was running crazy and did not server any requests. Oh well, it decided to reply my ping but not really allowing a SSH session.

So I needed to drag a TV downstairs to connect it via analog cable (fortunately I still found one), connect a keyboard and see that a process mono-sgen was eating all CPU 🙁 But what does it belong to? A ps -ef revealed that it belonged to duplicati – which is my backup solution.

Great. I found the problem.

Now let’s fix it

I am deploying all my containers with docker-compose and searched for a way to limit the CPU usage. *gnarf* The used version 3.4 does not support the quotas anymore –> Compose file versions and upgrading | Docker Documentation

When I set the docker-compose version to 2.4 and adjusted my duplicati container like this, It uses half a CPU max.

duplicati:
  image: duplicati/duplicati:beta
  cpus: "0.5"
  mem_limit: 512m
  container_name: duplicati
  ...

Links

VisionAI DevKit won’t deploy a module

Today my VisionAI DevKit was not deploying a module. In the logs (sudo journalctl -u iotedge -f) I could see the deployment was received:

Successfully pulled image machinelearndfd8df7d.azurecr.io/mobilenetimagenet:3
Creating module VisionSampleImagenet…
Could not create module VisionSampleImagenet
caused by: No such image: machinelearndfd8df7d.azurecr.io/mobilenetimagenet:3

Strange. During troubleshooting I started docker images and saw a lot of older images and versions. After deleting a log of them with docker image rm xyz the deployment succeeded and the module started. 🙂

Learning: Clean up the mess…