I'm running 7 docker containers on an Ubuntu machine.
When I start all the containers, they run fine. However, after a while, two of them stop running (even though I ran the docker run
command with the --restart always
option).
Then, I inspected these two containers (using the docker inspect
command) and saw that the following error was thrown:
runtime: failed to create new OS thread (have 7 already; errno=11)
I also counted the number of threads that are running in the docker process (20), using the command ps huH p <PID> | wc -l
.
I suppose I can't have so many containers running at the same time, right?
What should I do to avoid this system overload?