Skip to content

Commits suicide #184

@Stebalien

Description

@Stebalien

When I start running out of memory, earlyoom starts repeatedly killing itself (restarted by systemd).

OS: Arch Linux

Log Output:

earlyoom 1.5
Preferring to kill process names that match regex '(^|/)(gopls|rls)$'
Will avoid killing process names that match regex '(^|/)(emacs|emacsclient|X|systemd|zoom)$'
Could not set priority: Permission denied. Continuing anyway
Could not set oom_score_adj: Permission denied. Continuing anyway
mem total: 15898 MiB, swap total:    0 MiB
sending SIGTERM when mem <=  5.00% and swap <= 10.00%,
        SIGKILL when mem <=  2.50% and swap <=  5.00%
mem avail:   342 of 15898 MiB ( 2.16%), swap free:    0 of    0 MiB ( 0.00%)
low memory! at or below SIGKILL limits: mem  2.50%, swap  5.00%
sending SIGKILL to process 291787 uid 61876 "earlyoom": badness 0, VmRSS 0 MiB

Options:

/usr/bin/earlyoom -p -m 5 -r 0 --prefer (^|/)(gopls|rls)$ --avoid (^|/)(emacs|emacsclient|X|systemd|zoom)$

Systemd Unit:

[Unit]
Description=Early OOM Daemon
Documentation=man:earlyoom(1) https://github.com/rfjakob/earlyoom

[Service]
EnvironmentFile=-/etc/default/earlyoom
ExecStart=/usr/bin/earlyoom $EARLYOOM_ARGS
# Run as an unprivileged user with random user id
DynamicUser=true
# Allow killing processes and calling mlockall()
AmbientCapabilities=CAP_KILL CAP_IPC_LOCK
# We don't need write access anywhere
ProtectSystem=strict
# We don't need /home at all, make it inaccessible
ProtectHome=true
# earlyoom never exits on it's own, so have systemd
# restart it should it get killed for some reason.
Restart=always

[Install]
WantedBy=multi-user.target

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions