5 Commands to Protect Critical Apps From the Linux OOM Killer

Written By
T
TecMint
Nov 2, 2026

Your database keeps disappearing overnight, and the only clue is a kernel line saying “Out of memory: Killed process”. Here’s how to protect it using choom, OOMScoreAdjust, MemoryMax, a swap file, and systemd-oomd.
Imagine you check a server in the morning and find that MariaDB stopped at 2 AM, even though nothing changed in its configuration. The service restarts fine, the logs from MariaDB itself show nothing useful, and a few nights later it happens again.

When you finally look at the kernel log, you find that the Linux OOM killer (Out-Of-Memory killer) ended the database process because the server ran out of RAM.

What makes this confusing is that MariaDB usually wasn’t the program that used up the memory. A PHP worker, a runaway script, or a backup job asked for more memory than the server had, and the kernel picked the largest process it could find to free memory quickly, which on most servers is the database.

T

TecMint

Linux Today Logo

LinuxToday is a trusted, contributor-driven news resource supporting all types of Linux users. Our thriving international community engages with us through social media and frequent content contributions aimed at solving problems ranging from personal computing to enterprise-level IT operations. LinuxToday serves as a home for a community that struggles to find comparable information elsewhere on the web.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.