Repository navigation
Adjust "vm_memory_high_watermark" code to be more forgiving/strict about bad data (such as a memory limit of zero) - #149
Conversation
| if [ -r /sys/fs/cgroup/memory/memory.limit_in_bytes ]; then | ||
| memLimitB="$(< /sys/fs/cgroup/memory/memory.limit_in_bytes)" | ||
| if [ "$memLimitB" = '0' ]; then | ||
| # it appears that "WARNING: No kernel memory limit support" leads to "/sys/fs/cgroup/memory/memory.limit_in_bytes" containing the value "0" |
There was a problem hiding this comment.
Ok, this is confirmed to be FALSE; time to keep digging (although this PR's changes are probably still sane, possibly minus the 0 special-casing):
$ docker info > /dev/null
WARNING: No memory limit support
WARNING: No swap limit support
WARNING: No kernel memory limit support
WARNING: No oom kill disable support
WARNING: No cpu cfs quota support
WARNING: No cpu cfs period support
$ docker run --rm bash ls -l /sys/fs/cgroup/memory
ls: /sys/fs/cgroup/memory: No such file or directory|
@tianon could you please information about this var to README please? I just spend an hour trying to figure out what is wrong with my container UPD: ah, sorry. Didn't know that docs are in another repo |
|
Docs PR is up at docker-library/docs#879. 👍 |
|
Yesss, thanks to @jamesmallen, I've managed to hack something together to reproduce the issue: $ echo 18446744073709551615 > lol-limit
$ docker run -it --rm -v "$PWD/lol-limit":/sys/fs/cgroup/memory/memory.limit_in_bytes rabbitmq:alpine
...
=INFO REPORT==== 11-Apr-2017::20:23:20 ===
Memory limit set to 0MB of 32148MB total.
... |
…ge data (such as a reported memory limit of 18446744073709551615/MAX_UINT)
|
PR is updated! I've tested that several values calculate correctly now (uses |
|
By bind-mounting an empty file over I mean, RabbitMQ then gets (rightfully) grumpy, but it's a valid test of our code at least. 👍 |
|
(And by bad things, I mean throws some scary output, and then starts successfully, like a true trooper. 🤘) |
- `mysql`: 5.7.18, 5.6.36, 5.5.55, 8.0.1 - `rabbitmq`: adjust `vm_memory_high_watermark` handling to fix several edge cases (docker-library/rabbitmq#149) - `rocket.chat`: revert to 0.54.2, skipping RCs for the official image (RocketChat/Docker.Official.Image#31) - `tomcat`: update `8` and `latest` to be `8.5` (docker-library/tomcat#67)
|
@tianon wow this is a huge numbers. Great work! |
See also #148 and #147.