{"id":184,"date":"2026-05-30T23:23:34","date_gmt":"2026-05-31T06:23:34","guid":{"rendered":"https:\/\/hostandtech.com\/kb\/linux\/linux-oom-killer-how-to-fix\/"},"modified":"2026-05-30T23:23:34","modified_gmt":"2026-05-31T06:23:34","slug":"linux-oom-killer-how-to-fix","status":"publish","type":"post","link":"https:\/\/hostandtech.com\/kb\/linux\/linux-oom-killer-how-to-fix\/","title":{"rendered":"Linux OOM Killer: What It Is and How to Fix It"},"content":{"rendered":"<h2>Overview<\/h2>\n<p>The Linux OOM (out of memory) killer is a kernel mechanism that kicks in when your server has exhausted all available RAM and swap space. Rather than let the entire system lock up, the kernel picks one or more processes to terminate \u2014 freeing memory so the system can keep running. From a user&#8217;s perspective, it looks like MySQL randomly crashed, or Apache just stopped, with no clear reason in the application logs.<\/p>\n<p>On shared hosting you&#8217;ll rarely see this directly, but on a VPS or dedicated server it&#8217;s a common headache \u2014 especially if you&#8217;re running PHP-FPM, MySQL, Redis, and a Node.js app on a plan with 1\u20132 GB of RAM. The OOM killer isn&#8217;t a bug. It&#8217;s doing its job. The real problem is that your server is running out of memory, and the killer is just the last line of defence.<\/p>\n<p>This article covers how to confirm the OOM killer fired, how to identify what&#8217;s consuming memory, and how to either tune the killer&#8217;s behaviour or address the underlying memory pressure.<\/p>\n<h2>Prerequisites<\/h2>\n<ul>\n<li>Root or sudo access to your Linux server<\/li>\n<li>SSH access (PuTTY, Terminal, or similar)<\/li>\n<li>A basic understanding of Linux processes is helpful but not required<\/li>\n<li>Applies to: Ubuntu 20.04\/22.04\/24.04, Debian 11\/12, AlmaLinux 8\/9, Rocky Linux 8\/9, CentOS 7\/8<\/li>\n<\/ul>\n<h2>Step 1: Confirm the OOM Killer Actually Fired<\/h2>\n<p>Before you start tuning anything, confirm that the OOM killer is what killed your process. Don&#8217;t assume \u2014 check the kernel logs.<\/p>\n<div class=\"ht-code-snippet\"><button class=\"ht-code-snippet__copy\" type=\"button\" aria-label=\"Copy code\"><\/button><span class=\"ht-code-snippet__feedback\">Copied to clipboard<\/span><\/p>\n<pre class=\"ht-code-snippet__code\" id=\"code-block-1\"><code class=\"\" data-line=\"\">sudo dmesg | grep -i &quot;oom|killed process&quot;\n# or for systemd-based systems:\nsudo journalctl -k | grep -i &quot;oom|killed process&quot;<\/code><\/pre>\n<\/div>\n<p>You&#8217;re looking for lines like this:<\/p>\n<div class=\"ht-code-snippet\"><button class=\"ht-code-snippet__copy\" type=\"button\" aria-label=\"Copy code\"><\/button><span class=\"ht-code-snippet__feedback\">Copied to clipboard<\/span><\/p>\n<pre class=\"ht-code-snippet__code\" id=\"code-block-2\"><code class=\"\" data-line=\"\">Out of memory: Killed process 14532 (mysqld) score 842 or sacrifice child\nOom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=\/,mems_allowed=0,global_oom,task_memcg=\/system.slice\/mysql.service,task=mysqld,pid=14532,uid=999<\/code><\/pre>\n<\/div>\n<p>The &#8220;score&#8221; (or <code class=\"\" data-line=\"\">oom_score<\/code>) is how the kernel ranked that process as a candidate for termination. Higher score = more likely to get killed. If you see your process name in these lines, the OOM killer is confirmed.<\/p>\n<p>\ud83d\udcdd Note: On servers with log rotation enabled, older OOM events may have been rotated out of <code class=\"\" data-line=\"\">dmesg<\/code>. Check <code class=\"\" data-line=\"\">\/var\/log\/kern.log<\/code> (Debian\/Ubuntu) or <code class=\"\" data-line=\"\">\/var\/log\/messages<\/code> (RHEL-based) for historical records.<\/p>\n<h2>Step 2: Check Current Memory Usage<\/h2>\n<p>Once you&#8217;ve confirmed the killer fired, get a clear picture of where memory is going right now.<\/p>\n<div class=\"ht-code-snippet\"><button class=\"ht-code-snippet__copy\" type=\"button\" aria-label=\"Copy code\"><\/button><span class=\"ht-code-snippet__feedback\">Copied to clipboard<\/span><\/p>\n<pre class=\"ht-code-snippet__code\" id=\"code-block-3\"><code class=\"\" data-line=\"\">free -h\nps aux --sort=-%mem | head -20\ncat \/proc\/meminfo | grep -E &quot;MemTotal|MemFree|MemAvailable|SwapTotal|SwapFree&quot;<\/code><\/pre>\n<\/div>\n<p>Pay attention to the <code class=\"\" data-line=\"\">MemAvailable<\/code> line in <code class=\"\" data-line=\"\">\/proc\/meminfo<\/code> \u2014 it&#8217;s a better real-world indicator than <code class=\"\" data-line=\"\">MemFree<\/code> because it accounts for reclaimable cache. If it&#8217;s consistently under 10% of total RAM, your server is under genuine memory pressure.<\/p>\n<h2>Step 3: Identify the Memory Hogs<\/h2>\n<p>The process that gets killed isn&#8217;t always the one causing the problem. MySQL might get killed because PHP-FPM quietly consumed 800 MB of RAM over six hours.<\/p>\n<div class=\"ht-code-snippet\"><button class=\"ht-code-snippet__copy\" type=\"button\" aria-label=\"Copy code\"><\/button><span class=\"ht-code-snippet__feedback\">Copied to clipboard<\/span><\/p>\n<pre class=\"ht-code-snippet__code\" id=\"code-block-4\"><code class=\"\" data-line=\"\"># Sort by actual memory usage (RSS = resident set size in KB)\nps aux --sort=-%mem | awk &#039;NR&lt;=15{print $0}&#039;<\/code><\/pre>\n<\/div>\n<p>For a more detailed breakdown per process:<\/p>\n<div class=\"ht-code-snippet\"><button class=\"ht-code-snippet__copy\" type=\"button\" aria-label=\"Copy code\"><\/button><span class=\"ht-code-snippet__feedback\">Copied to clipboard<\/span><\/p>\n<pre class=\"ht-code-snippet__code\" id=\"code-block-5\"><code class=\"\" data-line=\"\">smem -r -k | head -20<\/code><\/pre>\n<\/div>\n<p>If <code class=\"\" data-line=\"\">smem<\/code> isn&#8217;t installed:<\/p>\n<div class=\"ht-code-snippet\"><button class=\"ht-code-snippet__copy\" type=\"button\" aria-label=\"Copy code\"><\/button><span class=\"ht-code-snippet__feedback\">Copied to clipboard<\/span><\/p>\n<pre class=\"ht-code-snippet__code\" id=\"code-block-6\"><code class=\"\" data-line=\"\"># Ubuntu\/Debian\nsudo apt install smem\n\n# AlmaLinux\/Rocky\/CentOS\nsudo yum install smem<\/code><\/pre>\n<\/div>\n<p>\u26a0 Warning: Don&#8217;t immediately kill the memory-hungry process until you understand why it&#8217;s using that much. A PHP process using 500 MB might be handling a legitimate large import job \u2014 killing it mid-run can corrupt data.<\/p>\n<h2>Step 4: Add or Expand Swap Space<\/h2>\n<p>If your server has little or no swap, that&#8217;s often the first thing to fix. Swap isn&#8217;t a replacement for RAM, but it gives the kernel somewhere to offload memory pages and buys you time. I&#8217;d recommend at least 1\u20132 GB of swap on any VPS with under 4 GB of RAM.<\/p>\n<div class=\"ht-code-snippet\"><button class=\"ht-code-snippet__copy\" type=\"button\" aria-label=\"Copy code\"><\/button><span class=\"ht-code-snippet__feedback\">Copied to clipboard<\/span><\/p>\n<pre class=\"ht-code-snippet__code\" id=\"code-block-7\"><code class=\"\" data-line=\"\"># Check existing swap\nswapon --show\n\n# Create a 2 GB swap file\nsudo fallocate -l 2G \/swapfile\nsudo chmod 600 \/swapfile\nsudo mkswap \/swapfile\nsudo swapon \/swapfile\n\n# Make it persistent across reboots\necho &#039;\/swapfile none swap sw 0 0&#039; | sudo tee -a \/etc\/fstab<\/code><\/pre>\n<\/div>\n<p>\ud83d\udcdd Note: On SSDs (which most of our <a href=\"https:\/\/www.hostandtech.com\/vps-ssd-servers\">VPS SSD Hosting<\/a> plans use), swap performance is reasonable. On spinning disk it&#8217;s noticeably slower, but still better than the OOM killer terminating MySQL.<\/p>\n<h2>Step 5: Tune the OOM Score for Critical Processes<\/h2>\n<p>You can tell the kernel to protect specific processes from being killed first by lowering their OOM score adjustment. The range is -1000 (never kill) to +1000 (kill first).<\/p>\n<div class=\"ht-code-snippet\"><button class=\"ht-code-snippet__copy\" type=\"button\" aria-label=\"Copy code\"><\/button><span class=\"ht-code-snippet__feedback\">Copied to clipboard<\/span><\/p>\n<pre class=\"ht-code-snippet__code\" id=\"code-block-8\"><code class=\"\" data-line=\"\"># Check the current OOM score of a process (replace PID with the actual process ID)\ncat \/proc\/&lt;PID&gt;\/oom_score\ncat \/proc\/&lt;PID&gt;\/oom_score_adj<\/code><\/pre>\n<\/div>\n<p>To protect MySQL from being killed before less critical processes:<\/p>\n<div class=\"ht-code-snippet\"><button class=\"ht-code-snippet__copy\" type=\"button\" aria-label=\"Copy code\"><\/button><span class=\"ht-code-snippet__feedback\">Copied to clipboard<\/span><\/p>\n<pre class=\"ht-code-snippet__code\" id=\"code-block-9\"><code class=\"\" data-line=\"\"># Find MySQL&#039;s PID\npgrep -a mysqld\n\n# Lower its OOM score adjustment\necho -500 | sudo tee \/proc\/&lt;PID&gt;\/oom_score_adj<\/code><\/pre>\n<\/div>\n<p>That&#8217;s temporary and resets on reboot. To make it persistent via systemd (for MySQL on AlmaLinux\/Ubuntu with systemd):<\/p>\n<div class=\"ht-code-snippet\"><button class=\"ht-code-snippet__copy\" type=\"button\" aria-label=\"Copy code\"><\/button><span class=\"ht-code-snippet__feedback\">Copied to clipboard<\/span><\/p>\n<pre class=\"ht-code-snippet__code\" id=\"code-block-10\"><code class=\"\" data-line=\"\">sudo systemctl edit mysql<\/code><\/pre>\n<\/div>\n<p>Then add:<\/p>\n<div class=\"ht-code-snippet\"><button class=\"ht-code-snippet__copy\" type=\"button\" aria-label=\"Copy code\"><\/button><span class=\"ht-code-snippet__feedback\">Copied to clipboard<\/span><\/p>\n<pre class=\"ht-code-snippet__code\" id=\"code-block-11\"><code class=\"\" data-line=\"\">[Service]\nOOMScoreAdjust=-500<\/code><\/pre>\n<\/div>\n<p>\u26a0 Warning: Setting <code class=\"\" data-line=\"\">OOMScoreAdjust=-1000<\/code> (which disables OOM killing for that process entirely) can cause a full system hang if that process is the one actually consuming all the memory. Use -500 to -800 as a safer middle ground for critical services.<\/p>\n<h2>Step 6: Fix the Underlying Memory Problem<\/h2>\n<p>Tuning OOM scores is a band-aid. The real fix is reducing memory consumption or adding more RAM. Common culprits on hosting servers:<\/p>\n<ul>\n<li><strong>MySQL <code class=\"\" data-line=\"\">innodb_buffer_pool_size<\/code> too high<\/strong> \u2014 a common mistake is setting this to 70\u201380% of total RAM on a server running multiple services. Set it to 40\u201350% if MySQL isn&#8217;t the only service.<\/li>\n<li><strong>PHP-FPM <code class=\"\" data-line=\"\">pm.max_children<\/code> set too high<\/strong> \u2014 each child process uses 30\u201380 MB depending on your app. On a 2 GB server with WordPress, 20 children is often already too many.<\/li>\n<li><strong>Memory leaks in long-running PHP or Node.js processes<\/strong> \u2014 monitor memory usage over time with <code class=\"\" data-line=\"\">ps<\/code> or set up a cron to log it hourly.<\/li>\n<li><strong>Redis <code class=\"\" data-line=\"\">maxmemory<\/code> not configured<\/strong> \u2014 Redis will consume all available RAM if you haven&#8217;t set a cap in <code class=\"\" data-line=\"\">\/etc\/redis\/redis.conf<\/code>.<\/li>\n<\/ul>\n<h2>Common Issues and Troubleshooting<\/h2>\n<h3>MySQL keeps getting killed despite having enough RAM<\/h3>\n<p>MySQL is often the highest-scoring process because it uses a lot of anonymous memory (the InnoDB buffer pool). Even on a server with available RAM, if <code class=\"\" data-line=\"\">innodb_buffer_pool_size<\/code> is set aggressively, MySQL will have a high OOM score. Lower the buffer pool size in <code class=\"\" data-line=\"\">\/etc\/mysql\/mysql.conf.d\/mysqld.cnf<\/code> (Debian\/Ubuntu) or <code class=\"\" data-line=\"\">\/etc\/my.cnf<\/code> (RHEL-based) and restart MySQL. Alternatively, adjust its OOM score as covered in Step 5.<\/p>\n<h3>OOM killer fires overnight with no obvious traffic spike<\/h3>\n<p>Scheduled tasks are almost always the cause. Cron jobs running backups, log processing, or database exports at 2 AM can spike memory hard and fast. Check <code class=\"\" data-line=\"\">\/var\/log\/cron<\/code> or <code class=\"\" data-line=\"\">sudo journalctl -u cron<\/code> and cross-reference the timestamps with your OOM killer log entries. Staggering your cron jobs and adding <code class=\"\" data-line=\"\">nice<\/code> and <code class=\"\" data-line=\"\">ionice<\/code> prefixes can help.<\/p>\n<h3>Server is sluggish but the OOM killer hasn&#8217;t fired yet<\/h3>\n<p>This is often swap thrashing \u2014 the system is paging memory in and out so aggressively that the server grinds to a near-halt. Check with <code class=\"\" data-line=\"\">vmstat 1 10<\/code> and look at the <code class=\"\" data-line=\"\">si<\/code> (swap in) and <code class=\"\" data-line=\"\">so<\/code> (swap out) columns. If those numbers are consistently non-zero, you&#8217;re in a pre-OOM state. Lowering <code class=\"\" data-line=\"\">vm.swappiness<\/code> to 10 can help: <code class=\"\" data-line=\"\">sudo sysctl vm.swappiness=10<\/code> and persist it in <code class=\"\" data-line=\"\">\/etc\/sysctl.conf<\/code>.<\/p>\n<h3>The wrong process keeps getting killed<\/h3>\n<p>If a low-priority worker process has a high memory footprint, the kernel may prefer killing MySQL over it even though the worker is the real problem. Raise the OOM score of your worker processes (<code class=\"\" data-line=\"\">oom_score_adj<\/code> closer to +500) so the kernel targets them first. This is especially relevant if you&#8217;re running custom queue workers or crawlers alongside production databases.<\/p>\n<h3>OOM errors appear in logs but free memory looks fine<\/h3>\n<p>This is a less obvious one. Some OOM kills happen not because of total memory exhaustion, but because of memory fragmentation or cgroup memory limits. If your server runs Docker containers or uses systemd slices with memory limits, a container can trigger its own OOM kill even when the host has free RAM. Check cgroup limits with <code class=\"\" data-line=\"\">systemctl status &lt;service&gt;<\/code> and look for <code class=\"\" data-line=\"\">MemoryMax<\/code> or <code class=\"\" data-line=\"\">MemoryLimit<\/code> settings.<\/p>\n<h2>FAQ<\/h2>\n<div class=\"ht-faq-section\">\n<h2>Frequently Asked Questions<\/h2>\n<div class=\"ht-faq-item\">\n<h3 class=\"ht-faq-question\">Will the OOM killer fire on shared hosting?<\/h3>\n<div class=\"ht-faq-answer\">\n<p>Generally no \u2014 on shared hosting plans, memory limits are enforced at the cPanel or CloudLinux level per account, so you&#8217;d typically see a PHP fatal memory error or a 500 error rather than an OOM kill event. The OOM killer is primarily a concern on VPS and dedicated servers where you control the full environment.<\/p>\n<\/div>\n<\/div>\n<div class=\"ht-faq-item\">\n<h3 class=\"ht-faq-question\">Is it safe to disable the OOM killer entirely?<\/h3>\n<div class=\"ht-faq-answer\">\n<p>You can set vm.overcommit_memory to 2 to prevent the kernel from allocating more memory than physically exists, which avoids OOM kills, but this can cause processes to simply fail to start rather than be killed later. On most hosting servers it&#8217;s not recommended unless you have very predictable, controlled workloads. The safer approach is tuning OOM scores and fixing the underlying memory issue.<\/p>\n<\/div>\n<\/div>\n<div class=\"ht-faq-item\">\n<h3 class=\"ht-faq-question\">How much RAM do I actually need to stop OOM errors?<\/h3>\n<div class=\"ht-faq-answer\">\n<p>It depends on your stack, but as a rough guide: a WordPress site running PHP-FPM, MySQL, and Nginx comfortably needs at least 1 GB of RAM, with 2 GB giving you room to breathe. If you&#8217;re running WooCommerce with Redis and multiple cron jobs, 4 GB is more realistic. If you&#8217;re consistently hitting OOM limits on your current plan, it&#8217;s worth looking at an upgrade.<\/p>\n<\/div>\n<\/div>\n<div class=\"ht-faq-item\">\n<h3 class=\"ht-faq-question\">Why does MySQL always get killed instead of other processes?<\/h3>\n<div class=\"ht-faq-answer\">\n<p>MySQL (specifically InnoDB) tends to have a high OOM score because it allocates large contiguous blocks of anonymous memory for the buffer pool. The kernel sees this as a good candidate to free a lot of memory fast. You can protect it by lowering its oom_score_adj value as described in this article, or by reducing innodb_buffer_pool_size so it doesn&#8217;t hold as much memory in the first place.<\/p>\n<\/div>\n<\/div>\n<div class=\"ht-faq-item\">\n<h3 class=\"ht-faq-question\">Does adding swap actually prevent OOM kills?<\/h3>\n<div class=\"ht-faq-answer\">\n<p>It helps, but it doesn&#8217;t fix the root cause. Swap gives the kernel more room to manoeuvre before reaching the point of killing processes, which can prevent OOM kills caused by short memory spikes. But if your server is consistently running out of memory, swap will eventually fill too, and the OOM killer will still fire \u2014 just later. Swap buys time; it doesn&#8217;t replace RAM.<\/p>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Your server starts killing processes without warning, Apache goes down, MySQL crashes \u2014 and the culprit is the Linux OOM killer. Here&#8217;s what&#8217;s actually happening and how to stop it.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[49],"tags":[404,409,408,402,403,406,407,405],"class_list":["post-184","post","type-post","status-publish","format-standard","hentry","category-linux","tag-linux-memory-management","tag-linux-oom-killer","tag-linux-oom-killer-what-it-is-and-how-to-fix-it","tag-oom-killer","tag-out-of-memory","tag-server-crash","tag-swap-memory","tag-vps-troubleshooting"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Linux OOM Killer: What It Is and How to Fix It<\/title>\n<meta name=\"description\" content=\"Learn what the Linux OOM killer is, why it terminates processes on your VPS or server, and how to fix out of memory errors before they take down your site.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/hostandtech.com\/kb\/linux\/linux-oom-killer-how-to-fix\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Linux OOM Killer: What It Is and How to Fix It\" \/>\n<meta property=\"og:description\" content=\"Learn what the Linux OOM killer is, why it terminates processes on your VPS or server, and how to fix out of memory errors before they take down your site.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/hostandtech.com\/kb\/linux\/linux-oom-killer-how-to-fix\/\" \/>\n<meta property=\"og:site_name\" content=\"Host And Tech knowledge base\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/stshostandtech\" \/>\n<meta property=\"article:published_time\" content=\"2026-05-31T06:23:34+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@stshostandtech\" \/>\n<meta name=\"twitter:site\" content=\"@stshostandtech\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/linux\\\/linux-oom-killer-how-to-fix\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/linux\\\/linux-oom-killer-how-to-fix\\\/\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/#\\\/schema\\\/person\\\/b6fa79c48ddaba71af32e395c5b017ee\"},\"headline\":\"Linux OOM Killer: What It Is and How to Fix It\",\"datePublished\":\"2026-05-31T06:23:34+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/linux\\\/linux-oom-killer-how-to-fix\\\/\"},\"wordCount\":1512,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/#organization\"},\"keywords\":[\"linux memory management\",\"Linux OOM Killer\",\"Linux OOM Killer: What It Is and How to Fix It\",\"OOM killer\",\"out of memory\",\"server crash\",\"swap memory\",\"VPS troubleshooting\"],\"articleSection\":[\"Linux Server\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/hostandtech.com\\\/kb\\\/linux\\\/linux-oom-killer-how-to-fix\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/linux\\\/linux-oom-killer-how-to-fix\\\/\",\"url\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/linux\\\/linux-oom-killer-how-to-fix\\\/\",\"name\":\"Linux OOM Killer: What It Is and How to Fix It\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/#website\"},\"datePublished\":\"2026-05-31T06:23:34+00:00\",\"description\":\"Learn what the Linux OOM killer is, why it terminates processes on your VPS or server, and how to fix out of memory errors before they take down your site.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/linux\\\/linux-oom-killer-how-to-fix\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/hostandtech.com\\\/kb\\\/linux\\\/linux-oom-killer-how-to-fix\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/linux\\\/linux-oom-killer-how-to-fix\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Linux OOM Killer: What It Is and How to Fix It\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/#website\",\"url\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/\",\"name\":\"Host And Tech knowledge base\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/#organization\",\"name\":\"Host And Tech knowledge base\",\"url\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/wp-content\\\/uploads\\\/2026\\\/05\\\/logo-dark.png\",\"contentUrl\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/wp-content\\\/uploads\\\/2026\\\/05\\\/logo-dark.png\",\"width\":1134,\"height\":395,\"caption\":\"Host And Tech knowledge base\"},\"image\":{\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/stshostandtech\",\"https:\\\/\\\/x.com\\\/stshostandtech\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/#\\\/schema\\\/person\\\/b6fa79c48ddaba71af32e395c5b017ee\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/aa1edac8bbadb442e059a5b65ad45a3b2e3ce689202373b96e3e567517ae4b39?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/aa1edac8bbadb442e059a5b65ad45a3b2e3ce689202373b96e3e567517ae4b39?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/aa1edac8bbadb442e059a5b65ad45a3b2e3ce689202373b96e3e567517ae4b39?s=96&d=mm&r=g\",\"caption\":\"admin\"},\"sameAs\":[\"https:\\\/\\\/hostandtech.com\\\/kb\"],\"url\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/author\\\/admin_fjj7qydm\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Linux OOM Killer: What It Is and How to Fix It","description":"Learn what the Linux OOM killer is, why it terminates processes on your VPS or server, and how to fix out of memory errors before they take down your site.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/hostandtech.com\/kb\/linux\/linux-oom-killer-how-to-fix\/","og_locale":"en_US","og_type":"article","og_title":"Linux OOM Killer: What It Is and How to Fix It","og_description":"Learn what the Linux OOM killer is, why it terminates processes on your VPS or server, and how to fix out of memory errors before they take down your site.","og_url":"https:\/\/hostandtech.com\/kb\/linux\/linux-oom-killer-how-to-fix\/","og_site_name":"Host And Tech knowledge base","article_publisher":"https:\/\/www.facebook.com\/stshostandtech","article_published_time":"2026-05-31T06:23:34+00:00","author":"admin","twitter_card":"summary_large_image","twitter_creator":"@stshostandtech","twitter_site":"@stshostandtech","twitter_misc":{"Written by":"admin","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/hostandtech.com\/kb\/linux\/linux-oom-killer-how-to-fix\/#article","isPartOf":{"@id":"https:\/\/hostandtech.com\/kb\/linux\/linux-oom-killer-how-to-fix\/"},"author":{"name":"admin","@id":"https:\/\/hostandtech.com\/kb\/#\/schema\/person\/b6fa79c48ddaba71af32e395c5b017ee"},"headline":"Linux OOM Killer: What It Is and How to Fix It","datePublished":"2026-05-31T06:23:34+00:00","mainEntityOfPage":{"@id":"https:\/\/hostandtech.com\/kb\/linux\/linux-oom-killer-how-to-fix\/"},"wordCount":1512,"commentCount":0,"publisher":{"@id":"https:\/\/hostandtech.com\/kb\/#organization"},"keywords":["linux memory management","Linux OOM Killer","Linux OOM Killer: What It Is and How to Fix It","OOM killer","out of memory","server crash","swap memory","VPS troubleshooting"],"articleSection":["Linux Server"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/hostandtech.com\/kb\/linux\/linux-oom-killer-how-to-fix\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/hostandtech.com\/kb\/linux\/linux-oom-killer-how-to-fix\/","url":"https:\/\/hostandtech.com\/kb\/linux\/linux-oom-killer-how-to-fix\/","name":"Linux OOM Killer: What It Is and How to Fix It","isPartOf":{"@id":"https:\/\/hostandtech.com\/kb\/#website"},"datePublished":"2026-05-31T06:23:34+00:00","description":"Learn what the Linux OOM killer is, why it terminates processes on your VPS or server, and how to fix out of memory errors before they take down your site.","breadcrumb":{"@id":"https:\/\/hostandtech.com\/kb\/linux\/linux-oom-killer-how-to-fix\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/hostandtech.com\/kb\/linux\/linux-oom-killer-how-to-fix\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/hostandtech.com\/kb\/linux\/linux-oom-killer-how-to-fix\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/hostandtech.com\/kb\/"},{"@type":"ListItem","position":2,"name":"Linux OOM Killer: What It Is and How to Fix It"}]},{"@type":"WebSite","@id":"https:\/\/hostandtech.com\/kb\/#website","url":"https:\/\/hostandtech.com\/kb\/","name":"Host And Tech knowledge base","description":"","publisher":{"@id":"https:\/\/hostandtech.com\/kb\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/hostandtech.com\/kb\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/hostandtech.com\/kb\/#organization","name":"Host And Tech knowledge base","url":"https:\/\/hostandtech.com\/kb\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/hostandtech.com\/kb\/#\/schema\/logo\/image\/","url":"https:\/\/hostandtech.com\/kb\/wp-content\/uploads\/2026\/05\/logo-dark.png","contentUrl":"https:\/\/hostandtech.com\/kb\/wp-content\/uploads\/2026\/05\/logo-dark.png","width":1134,"height":395,"caption":"Host And Tech knowledge base"},"image":{"@id":"https:\/\/hostandtech.com\/kb\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/stshostandtech","https:\/\/x.com\/stshostandtech"]},{"@type":"Person","@id":"https:\/\/hostandtech.com\/kb\/#\/schema\/person\/b6fa79c48ddaba71af32e395c5b017ee","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/aa1edac8bbadb442e059a5b65ad45a3b2e3ce689202373b96e3e567517ae4b39?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/aa1edac8bbadb442e059a5b65ad45a3b2e3ce689202373b96e3e567517ae4b39?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/aa1edac8bbadb442e059a5b65ad45a3b2e3ce689202373b96e3e567517ae4b39?s=96&d=mm&r=g","caption":"admin"},"sameAs":["https:\/\/hostandtech.com\/kb"],"url":"https:\/\/hostandtech.com\/kb\/author\/admin_fjj7qydm\/"}]}},"_links":{"self":[{"href":"https:\/\/hostandtech.com\/kb\/wp-json\/wp\/v2\/posts\/184","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hostandtech.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hostandtech.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hostandtech.com\/kb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hostandtech.com\/kb\/wp-json\/wp\/v2\/comments?post=184"}],"version-history":[{"count":0,"href":"https:\/\/hostandtech.com\/kb\/wp-json\/wp\/v2\/posts\/184\/revisions"}],"wp:attachment":[{"href":"https:\/\/hostandtech.com\/kb\/wp-json\/wp\/v2\/media?parent=184"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hostandtech.com\/kb\/wp-json\/wp\/v2\/categories?post=184"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hostandtech.com\/kb\/wp-json\/wp\/v2\/tags?post=184"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}