Skip to content

Chore: adding sysctl params for rebooting the OS after oomkiller kill… #759

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

Merged
merged 1 commit into from
Oct 17, 2023

Conversation

supaPatrick
Copy link
Contributor

adding sysctl params to restart the system on OOM.
tested the machine does restart on OOM.

Please go the the Preview tab and select the appropriate sub-template:

@supaPatrick supaPatrick requested a review from a team as a code owner October 16, 2023 22:13
- name: Set vm.panic_on_oom=1
ansible.builtin.sysctl:
name: vm.panic_on_oom
value: '1'
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want 2? I guess 1 is fine right now since PG memory usage is not capped?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I thought 1 seemed better sense we aren't using cgroups.

Copy link
Contributor

Choose a reason for hiding this comment

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

Some of our services use systemd resource controls (e.g. https://github.com/supabase/postgres/blob/develop/ansible/files/gotrue.service.j2#L13) which internally uses cgroups afaik

@supaPatrick supaPatrick merged commit c78bcf8 into develop Oct 17, 2023
@supaPatrick supaPatrick deleted the chore--restart-instance-on-oom branch October 17, 2023 03:13
damonrand pushed a commit to cepro/postgres that referenced this pull request Jun 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants