fix: protect mastercontainer from OOM situations#8082
Conversation
Agent-Logs-Url: https://github.com/nextcloud/all-in-one/sessions/d5e09741-3bc4-4667-90ad-0256383a953d Co-authored-by: szaimen <42591237+szaimen@users.noreply.github.com>
Agent-Logs-Url: https://github.com/nextcloud/all-in-one/sessions/40122d48-db6c-4993-a220-40597fcf8262 Co-authored-by: szaimen <42591237+szaimen@users.noreply.github.com>
Signed-off-by: Simon L. <szaimen@e.mail.de>
Zoey2936
left a comment
There was a problem hiding this comment.
I would strongly recommend to NOT do this, it makes no sense giving the mastercontainer a lower value then the hosts init process or docker itself.
|
@copilot please change the -1000 value to -500 |
Agent-Logs-Url: https://github.com/nextcloud/all-in-one/sessions/53fe8b24-fd33-494f-a9c7-9732b56c9055 Co-authored-by: szaimen <42591237+szaimen@users.noreply.github.com>
Done. Changed all occurrences of |
|
@Zoey2936 is this better now? |
|
At least on my system the oom_score is calculates like this: |
I fear I don't really understand. Can you maybe make some suggestions how you would choose the values? In my opinion the values should be chosen based on the importance of each component for the whole system. Is that not the best approach? |
Yes, but we can't assume that users set this value for all services running on the server, which are not managed by AIO |
So what would be your approach to the idea of adding this value to the aio cotnainers and especiall the mastercontainer? Having the value set for the mastercontainer will not automatically kill other applications iirc... |
|
Yes, but in theory the docker daemon could be killed before the master container in theory an example |
I see so i guess the value here for the mastercontainer should be lower than the value of the docker daemon right? |
|
the docker deamon should be killed after the container |
I just checked and the default value for the docker daemon seems to be -500. So having -500 for the mastercontainer should be fine imho. WDYT? |
|
Where do you have the -500 from? |
|
Ohhh that explains it, my server uses alpine as host os which does not set this value. Maybe this could be connected to an env? |

Sets
oom_score_adj: -500incompose.yamland adds--oom-score-adj -500to alldocker runcommands in the documentation. This instructs the Linux OOM killer to strongly prefer killing other processes before the mastercontainer, keeping the AIO interface accessible even under memory pressure.Changes Made
compose.yaml— addedoom_score_adj: -500with an explanatory commentreadme.md—--oom-score-adj -500added to Linux and Windowsdocker runcommands; explanation bullet added in the<details>sectionreverse-proxy.md— same: Linux + Windows commands and explanation bulletmultiple-instances.md,develop.md,php/README.md—--oom-score-adj -500added to each mastercontainerdocker runinvocation