-
Notifications
You must be signed in to change notification settings - Fork 30
docker: "fatal error: runtime: out of memory" when container produces lots of logs #908
Comments
I can also easily see this error, with docker 1.8.2, kernel 4.3-rc4 on a virtual machine with 1G RAM. |
Docker 1.9.0-dev 52de250 (current master) seems to be a little different from 1.8.2. Now with 1.9.0-dev the dockerd process doesn't die immediately on the internal buffer, but it runs for a while, until the kernel oom-killer actually kills that daemon. |
I think we can close this issue, as the problem was already solved by moby/moby#16190, which reimplements NewBufReader(). See also https://github.com/LK4D4/docker/commit/24310b5b4ab600ab5cb046d2f2ceaaa086b30be3 and https://github.com/LK4D4/docker/commit/56b70bf84e253bfedef94248a0b6b1f8d730091c. |
I would be careful closing this. The reason moby/moby@52de250 behaves differently, is that it includes moby/moby#16190 . However, as @dongsupark witnessed, it still allocates unlimited memory (the internal buffer is not capped even after moby/moby#16190 , despite appearances ) when logging faster than logs are consumed. |
There's a new PR up re: bounded buffer: moby/moby#17877 |
bump & 👍 |
moby/moby#17877 is merged and is in 1.10.0. it could potentially be backported to 1.9.1. i was not able to reproduce this problem on coreos 983.0.0. |
moby/moby#17877 should definitely prevent this issue, indeed. |
This should no longer be an issue now that a newer Docker is being shipped. |
Reproducible in 647.0.0, 723.3.0 and 815.0.0
Use this test systemd unit:
Run it and you'll receive
fatal error: runtime: out of memory
error message/cc @philips @crawford
UPDATE: weird... busybox+sh fails docker container. ubuntu+sh fails container. ubuntu+bash - not.
UPDATE1: increased burst and rate interval (
RateLimitInterval=120s
andRateLimitBurst=10000
) produces same docker issue even with ubuntu container + bash.The text was updated successfully, but these errors were encountered: