Skip to content

fix: protect mastercontainer from OOM situations - #8082

Open
szaimen with Copilot wants to merge 4 commits into
mainfrom
copilot/investigate-oom-situations
Open

fix: protect mastercontainer from OOM situations#8082
szaimen with Copilot wants to merge 4 commits into
mainfrom
copilot/investigate-oom-situations

Conversation

Copilot AI commented May 12, 2026

Copy link
Copy Markdown
Contributor

Sets oom_score_adj: -500 in compose.yaml and adds --oom-score-adj -500 to all docker run commands 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 — added oom_score_adj: -500 with an explanatory comment
  • readme.md--oom-score-adj -500 added to Linux and Windows docker run commands; explanation bullet added in the <details> section
  • reverse-proxy.md — same: Linux + Windows commands and explanation bullet
  • multiple-instances.md, develop.md, php/README.md--oom-score-adj -500 added to each mastercontainer docker run invocation

Comment thread compose.yaml Outdated
Comment thread Containers/mastercontainer/Dockerfile Outdated
Signed-off-by: Simon L. <szaimen@e.mail.de>
@szaimen szaimen added 3. to review Waiting for reviews and removed 2. developing Work in progress labels May 12, 2026
@szaimen
szaimen marked this pull request as ready for review May 12, 2026 11:40

@Zoey2936 Zoey2936 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@szaimen

szaimen commented May 12, 2026

Copy link
Copy Markdown
Collaborator

@copilot please change the -1000 value to -500

Copilot AI commented May 12, 2026

Copy link
Copy Markdown
Contributor Author

@copilot please change the -1000 value to -500

Done. Changed all occurrences of -1000 to -500 across compose.yaml, readme.md, reverse-proxy.md, develop.md, multiple-instances.md, and php/README.md, and updated the explanatory text accordingly (commit 988258b).

@szaimen
szaimen requested a review from Zoey2936 May 12, 2026 13:08
@szaimen

szaimen commented May 12, 2026

Copy link
Copy Markdown
Collaborator

@Zoey2936 is this better now?

@Zoey2936

Zoey2936 commented May 12, 2026

Copy link
Copy Markdown
Collaborator

At least on my system the oom_score is calculates like this: 666 + ((ram-usage / total-ram-swap) * 666), the first 666 comes from it being a non privileged process. So this means setting the adj to -667 or lower will always make it better then any non-privileged process. I think the score of containers should be similiar to expected memory usage. if you understand

@szaimen szaimen modified the milestones: v13.2.1, next Jun 8, 2026
@szaimen

szaimen commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator

Where do you have the -500 from?

image

@Zoey2936

Copy link
Copy Markdown
Collaborator

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?

@szaimen

szaimen commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

I'll further look into this and work on this after my vacation 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants