What is docker containerd shim? Why does it start many sub processes and take up a lot of my memory?

I have a Python Django Container,After running for a period of time, there are many sub processes:

This container start by docker-compose,It includes a health check.

I know a container will start a shim,why this start many?

I can only restart the container every time to return to normal.
this is normal status:

It makes me feel bad.

Do you mind sharing the output of docker info as it appears you are either not running a package distributed by dockers repos or a rather older version.

First of all the shims are normal and they are required for proper integration between the container manager and the runtime itself. In your case it is beteen docker and containerd. On recent docker versions the shim shifted between containerd and runc.

1 Like

thank you,this is output:

Version 1.13.1, looks like the ancient version CentOS forked from the docker sources roughly 5 or 6 years ago and is maintained from CentOS since (at least I hope they maintain it…)

I would strongly recommend to install docker from docker’s official repos, see: Install Docker Engine on CentOS | Docker Documentation

ok,got it !
thank you for your answer