Dockerized .Net core "No space left on the device" error

5/30/2019

On the project, we faced with the issue related to the crash of docker agent "No space left on the device".

On one of the nodes of K8S cluster, we executed the command:

# ps -eLf | grep './DotNetApp' | awk '{print $10}' | wc -l
13882

It means that all my .Net processes have 13882 threads. On the node, with this leak to a limit of the maximum number of threads.

To check the limit, you can execute:

root@ip-172-20-104-47:~# cat /proc/sys/kernel/pid_max
32768

"Threads" is the amount, but pid_max is about the pool of the ids. And pods can easily reach this limit and crash docker on the node.

We use CentOS for the K8S worker. We tried Ubuntu and got the same result.

Do you have any ideas, why do we have such a thread leak on Linux nodes under .net core 2.2?

-- Leonid
.net-core
docker
kubernetes

0 Answers