-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Executing a simple command like ls
from host to the container is very slow
#1194
Comments
In #466, it seems that the reason for the slowness is due to the problem introduced in |
Here's the And here's the What interesting in these logs is that it took roughly 5 seconds for mario's docker-containerd-shim from receiving the command to execute which is |
I experience the same issue with |
Aa this issue only appears in the production environment, and I cannot constantly reproduce the issue in the dev environment, I haven't found any workaround. |
The health status monitor always reports that the container service status is abnormal. But the real service is not affected. The Docker logs show that the execution of the health check command has timed out, so the container status is abnormal. Then I found, a simple command like
docker exec -it {container name} ls
would take several seconds to complete.The output of
strace -r {docker command}
andstrace -c {docker command}
show that the root cause for the slowness may come from the Docker daemon.stracer.log
This problem does not always occur, the command execution time is normal in a low-load development environment.
The load in the production environment is not very high, ~20% CPU average load, ~40% memory usage.
I tried to reproduce this problem in the development environment by sending massive HTTP requests to our Nginx service from another machine. Only 5% of the docker exec commands are slower than normal.
Here's the goroutine stack trace of Docker daemon when the Docker exec command became unresponsive.
goroutine-stacks-2021-01-22T181928+0800.log
Expected behavior
The same time should take form the host to the container as from the container's terminal.
Actual behavior
The time for the host to the container command is much slower than the container's terminal command.
Steps to reproduce the behavior
I am not sure how to reproduce this problem 100% with a minimum reproduction example. I can only provide
strace
result and stack trace result. I can provide more details if anyone needs any further information.Output of
docker version
:Output of
docker info
:Additional environment details (AWS, VirtualBox, physical, etc.)
Physical.
The text was updated successfully, but these errors were encountered: