My Profile Photo

Sheogorath's Blog

Systemd and OOM

Today I learned that Systemd will execute the equivalent of systemctl stop <service> when a process of your service runs OOM by default. This will mean that you might experience a downtime, when a OOM situation occurs even though your service might can handle it, when one of the processes is killed completely gracefully. You can adjust the behaviour by setting OOMPolicy in your service definition.

I came across this while reading an article from Fedora Planet, which explained this situation in detail on the example of httpd.