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
Docker running on high CPU and crashes in the end #21181
Comments
Hmm, I've noticed that running asterisk with -f instead of -c, fixes this issue, but it still doesn't explain why the docker daemon keeps on running on high CPU, and keeps on allocating memory.
|
Asterisk console mode just outputs "\r\n" as fast as it possibly can. Docker just loops reading those CRLF pairs faster than it can output them. There is always something there for it to read, this is why it spins at 100%. There is no way to output it as fast as it can write it, that is why the memory footprint of the docker daemon balloons until it OOMs. The fix is indeed to disable Asterisk console mode (don't use "-c" when running under docker, ever). I want to say this is an Asterisk bug, but even at 100% CPU use to keep up, Docker really should quash these duplicates somehow as well to avoid logging buffer explosion. |
+1 we should prevent this from breaking Docker. |
@michaelarnauts Could you tell me how you've started that container, please? I'm currently running an image which uses |
@ianblenke That sounds logical, although I don't see any log messages scroll by when I run a Edit: It also helps to run it in a VM with only one CPU core, and a limited amount of memory. |
@michaelarnauts Could you tell me the exact options you've passed to |
I've started it trough docker-compose with
With the following Dockerfile in
And the following
|
@michaelarnauts as stated, you can't use |
@cpuguy83, sure |
Yep, we know what the issue is, just not an entirely simple fix. |
This is fixed. dockerd will now break up extremely long lines so a container's output cannot overwhelm the daemon. |
Output of
docker version
:Output of
docker info
:Additional environment details (AWS, VirtualBox, physical, etc.):
Happens with a docker running on a physical machine, but also in a VirtualBox.
CPU of physical machine: Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Steps to reproduce the issue:
Dockerfile
belowasterisk
process, but also of thedocker daemon
.Describe the results you received:
Describe the results you expected:
Additional information you deem important (e.g. issue happens only occasionally):
I've already tried removing all files in
/var/lib/docker
. Also running inside a clean Ubuntu 14.04 VirtualBox gives the same results.Dockerfile:
The text was updated successfully, but these errors were encountered: