Docker Desktop for Windows creates a whole load of processes and eventually crashes

I’m running Docker Desktop for Windows v4.22.1 on Windows 10 Pro on 2 machines. I’ve limited the memory to 4 GB to ensure Windows can still be used. When I look at Task Manager with the Docker Desktop open I see it has 2 → 8 subprocesses running normally. But after some time (think few days) it doesn’t seem to close processes anymore, and eventually it causes all the docker containers to stop reacting. I see the number of processes around those times between 500 and 1000 and Docker Desktop for Windows itself takes up 3 GB of memory, next to the 4 GB already taken up by VMMEM. Stopping docker or the containers doesn’t help/work.

Strange thing is both machines have this problem, one has 8GB of memory and the other has 16GB of memory, but also runs a VM taking up 4GB.

What kind of processes?

Docker Desktop executables, docker.exe, docker client, Consoleeventhosts, Windows Command Processor. They all seem normal processes, since I have them also when everything is running fine, but most close by themselves and open again (probably related to background tasks in the containers? This is how it looks when it’s not crashing.
image

So sometimes you see more than 500 Docker Desktop processess, for example like “Docker Desktop (657)”?

I have no idea how it could happen, but I never ran Docker Desktop so long. Not even on macOS and I almost never turn off the MacBook… Docker Desktop is for development and not for longrunning containers. Nevertheless, it still looks like a bug that you could report here:

Even if you don’t run containers for days, Docker Desktop itself could run I guess, so it shouldn’t produce hundreds of processes on the host.

Yeah exactly, I figured the processes are tasks done within the container, and once they are done they close (normally). But for some reason the processes keep hanging and piling up until it causes the whole server to be unstable.

Are you running Windows containers? Linux containers would not be visible from the host as processes only in the virtual machine.

That is a good question, not sure. I just use the Windows Docker client and powershell to run Docker-Compose.

If the context menu of Docker Desktop looks like this (check the yellow marked menu entry), then you are running Linux Containers.

In that case I’m running Linux containers, I have the option to Switch to Windows containers

Same problem here. Running windows containers.