{"id":19926,"date":"2023-01-13T09:00:00","date_gmt":"2023-01-13T08:00:00","guid":{"rendered":"https:\/\/www.codemotion.com\/magazine\/?p=19926"},"modified":"2023-01-12T19:32:27","modified_gmt":"2023-01-12T18:32:27","slug":"what-is-the-oomkilled-error-in-linux-and-kubernetes-and-how-to-solve-it","status":"publish","type":"post","link":"https:\/\/www.codemotion.com\/magazine\/devops\/qa-testing\/what-is-the-oomkilled-error-in-linux-and-kubernetes-and-how-to-solve-it\/","title":{"rendered":"What is the OOMKilled Error in Linux and Kubernetes and How to Solve It"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\" id=\"h-what-is-the-oomkilled-error\">What is the OOMKilled Error?<\/h2>\n\n\n\n<p>OOMKilled is a common error in Linux operating systems. Linux systems have a program called <strong>Out of Memory Manager (OOM) <\/strong>that tracks the memory usage of each process. If your system is in danger of running out of available memory, the OOM Killer will appear and attempt to kill processes, to free up memory and prevent crashes. When a process is terminated by OOM, Linux will display the OOMKilled error.<\/p>\n\n\n\n<p>OOM Killer&#8217;s goal is to free up as much memory as possible by killing the least number of processes. Internally,<strong> OOM Killer assigns a score to each running process<\/strong>. The higher the score, the more likely the process is to be terminated.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-how-can-you-prevent-the-oomkilled-error-in-linux\">How Can You Prevent the OOMKilled Error in Linux?<\/h2>\n\n\n\n<p>Using Linux with default settings can result in memory overcommitment. This improves resource utilization, but on the other hand,<strong> it is risky because memory cannot be directly controlled by applications.<\/strong> Instead of simply fixing the error and restoring terminated processes, it is a good idea to think about the problem holistically and find a strategy for improving memory usage.<\/p>\n\n\n\n<p>Linux can be configured to use different strategies for allocating memory. <strong>You can find the current policy by mounting the proc filesystem and reading from \/proc\/sys\/vm\/. <\/strong>The files overcommit_ratio and overcommit_memory govern how much memory the system can commit beyond the available physical memory.<\/p>\n\n\n\n<p>The Out of Memory (OOM) Killer will only run if your system is configured to overcommit memory. If you don&#8217;t want the system to overcommit, set overcommit_memory to 2 overcommit_ratio to 0. This will prevent overcommitting and essentially, disable the OOM killer.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-identifying-and-diagnosing-oomkilled-errors\">Identifying and Diagnosing OOMKilled Errors<\/h2>\n\n\n\n<p>You\u2019ll need to rely on logs to find out about OOM errors. Linux has many different logging tools. One open source tool you can use is <a href=\"https:\/\/man7.org\/linux\/man-pages\/man8\/systemd-journald.8.html\">journald<\/a>. It reads information about kernel events using the syslog interface. It provides a CLI called journalctl which lets you navigate through logs.<\/p>\n\n\n\n<p>Run the following command to view OOM logs:<\/p>\n\n\n<pre class=\"wp-block-code\"><span><code class=\"hljs\">$ journalctl --utc -b -X -ke<\/code><\/span><\/pre>\n\n\n<p>X must be an integer, the minus sign next to it indicates it is a negative number. You can use negative integers to count down from the last boot, and positive integers to count forward from the first boot.<\/p>\n\n\n\n<p>The -e option fast-forwards to the end of the log. Then you can use one of the available search commands. <strong>For example, ?killed will allow you to find log info related to OOMKilled<\/strong>. This will present a log with a virtual memory status summary at the time the OOM Killer ran, with statistics about processes and their memory usage.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-understanding-the-oomkilled-error-in-kubernetes-p1\">Understanding the OOMKilled Error in Kubernetes [P1]<\/h2>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"577\" src=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2022\/10\/Kubernetes1-1024x577.jpg\" alt=\"kubernetes, linux, OOMKilled\" class=\"wp-image-18949\" srcset=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2022\/10\/Kubernetes1-1024x577.jpg 1024w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2022\/10\/Kubernetes1-300x169.jpg 300w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2022\/10\/Kubernetes1-768x432.jpg 768w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2022\/10\/Kubernetes1-896x504.jpg 896w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2022\/10\/Kubernetes1-400x225.jpg 400w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2022\/10\/Kubernetes1.jpg 1254w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">How to solve OOMKilled error in Kubernetes?<\/figcaption><\/figure>\n\n\n\n<p>OOMKilled is a common error in <a href=\"https:\/\/www.codemotion.com\/magazine\/devops\/cloud\/kubernetes-more-than-just-containers\/\" target=\"_blank\" aria-label=\"Kubernetes  (opens in a new tab)\" rel=\"noreferrer noopener\" class=\"ek-link\">Kubernetes <\/a>clusters (see this in-depth blog post for more background on <a href=\"https:\/\/komodor.com\/learn\/how-to-fix-oomkilled-exit-code-137\/\" target=\"_blank\" aria-label=\" (opens in a new tab)\" rel=\"noreferrer noopener\" class=\"ek-link\">OOMKilled in Kubernetes<\/a>).<\/p>\n\n\n\n<p><strong>How is OOMKilled related to cluster resource allocation?<\/strong><\/p>\n\n\n\n<p>Applications deployed in production Kubernetes clusters require appropriate resource allocation settings to run smoothly. <strong>Optimal amounts of storage, CPU, and memory should always be available<\/strong>, especially when multiple instances of an application are running. It is a balancing act between providing sufficient hardware resources and <a href=\"https:\/\/spot.io\/resources\/cloud-cost\/cloud-cost-optimization-15-ways-to-optimize-your-cloud\/\" target=\"_blank\" aria-label=\" (opens in a new tab)\" rel=\"noreferrer noopener\" class=\"ek-link\">minimizing cloud costs<\/a>.<\/p>\n\n\n\n<p>It is especially important to reserve sufficient resources for applications to scale, based on usage and load, without impacting service availability. When dealing with memory and CPU utilization, this additional buffer of resources is called headroom.&nbsp;<\/p>\n\n\n\n<p><strong>OOMKilled reflects lack of headroom for Kubernetes pods<\/strong><\/p>\n\n\n\n<p>For applications running as pods in a Kubernetes cluster, you can use the Metrics Server to track headroom and automatically scale these pods. If there is not enough headroom, <strong>Kubernetes will start shutting down pods<\/strong>, returning the OOMKilled error to pod containers.\u00a0<\/p>\n\n\n\n<p>If this error occurs, you will need to provide more resources to get your application working again. This can be time consuming, costly and cause production downtime. To avoid this, it&#8217;s important to accurately estimate how many resources your application will need before deploying it into production.<\/p>\n\n\n\n<p><strong>Measuring headroom to prevent OOMKilled errors<\/strong><\/p>\n\n\n\n<p>Headroom primarily reflects memory and CPU utilization. In Kubernetes, CPU utilization is measured in \u201cmillicores\u201d, and memory usage in MiB (megabytes). Clusters running on-premises have limited available headroom. The computing power required for a pod to process a task is dynamic, because it is based on the current tasks performed. As pods face more complex tasks, they consume more resources, resulting in increased CPU and memory utilization.&nbsp;<\/p>\n\n\n\n<p>Pods can be scaled horizontally when they reach specific thresholds, to handle increasing loads and ensure availability. <strong>This spins up more pods through a process called horizontal pod autoscaling (HPA).<\/strong> When the hardware limit is exhausted, the pod will start throwing OOMKilled errors\u2014this can be caused by traffic load spikes, infinite loops or memory leaks.<\/p>\n\n\n\n<p>An OOMKilled error means that the pod\u2019s containers are terminated and unable to process requests. If multiple pods see this error during traffic peaks, <strong>it will affect multiple services<\/strong>, negatively impacting service availability and end-user experience. Additionally, if a pod is unable to service a request for data, you still pay for the infrastructure but pods are not actually usable.\u00a0<\/p>\n\n\n\n<p><strong>Using load testing to simulate loads and anticipate OOMKilled errors<\/strong><\/p>\n\n\n\n<p>OOMKilled errors are common when a pod is experiencing unusually high loads, and it is not aware that sufficient resources have not been deployed. With load testing, you can simulate traffic several times higher than usual and monitor how your pods perform under the load. This is how headroom is measured in real-world scenarios. <strong>Many unexpected situations can be tested during load testing,<\/strong> such as logic errors, memory leaks, dependency-based errors, and concurrency mismatches.<\/p>\n\n\n\n<p><strong>Using autoscaling and monitoring to address the problem<\/strong><\/p>\n\n\n\n<p><a href=\"https:\/\/granulate.io\/blog\/kubernetes-autoscaling-the-hpa\/\" target=\"_blank\" aria-label=\" (opens in a new tab)\" rel=\"noreferrer noopener\" class=\"ek-link\">Kubernetes provides automated scaling<\/a>, but human intervention may be required due to the dynamic nature of cloud-native applications. To limit these interventions, it is important to analyze the key metrics of the application and make an informed estimate of the amount of headroom required.\u00a0<\/p>\n\n\n\n<p>Metrics collection can be complex, and is often managed with specialized tools such as Prometheus, Jaeger, and Grafana. These tools should be installed inside the running node and systematically export metrics to the desired backend.&nbsp;<\/p>\n\n\n\n<p>Many companies are building data lakes to make it easier to analyze metrics and draw conclusions from the data. <strong>Key metrics to monitor on Kubernetes clusters include CPU and memory utilization, network traffic, pod health, API server latency, and CrashLoopBackoff errors<\/strong>. In addition to these metrics, you can use custom application metrics to measure errors and unexpected behavior.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"450\" src=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/08\/qa-tester-e1649768472591.png\" alt=\"Software Quality Assurance Analyst, automated testing\" class=\"wp-image-7576\" srcset=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/08\/qa-tester-e1649768472591.png 800w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/08\/qa-tester-e1649768472591-300x169.png 300w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/08\/qa-tester-e1649768472591-768x432.png 768w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/08\/qa-tester-e1649768472591-400x225.png 400w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><figcaption class=\"wp-element-caption\">Identify the process that is consuming the most memory and take steps to reduce its memory usage.<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-conclusion\">Conclusion<\/h2>\n\n\n\n<p>In conclusion, the OOMKilled error (Out Of Memory Killed) is a common issue that can occur when a process in a Linux or Kubernetes system consumes too much memory and causes the system to run out of available memory. This can lead to performance issues and can even cause the system to <strong>crash. To solve the OOMKilled error, it is necessary to identify the process that is consuming the most memory and take steps to reduce its memory usage<\/strong>. This can involve optimizing the application or workload, or increasing the amount of available memory. By addressing the root cause of the OOMKilled error, organizations can improve the stability and performance of their Linux and Kubernetes systems and prevent future occurrences of this error.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>What is the OOMKilled Error? OOMKilled is a common error in Linux operating systems. Linux systems have a program called Out of Memory Manager (OOM) that tracks the memory usage of each process. If your system is in danger of running out of available memory, the OOM Killer will appear and attempt to kill processes,&#8230; <a class=\"more-link\" href=\"https:\/\/www.codemotion.com\/magazine\/devops\/qa-testing\/what-is-the-oomkilled-error-in-linux-and-kubernetes-and-how-to-solve-it\/\">Read more<\/a><\/p>\n","protected":false},"author":100,"featured_media":19929,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_editorskit_title_hidden":false,"_editorskit_reading_time":5,"_editorskit_is_block_options_detached":false,"_editorskit_block_options_position":"{}","_uag_custom_page_level_css":"","_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","footnotes":""},"categories":[9885],"tags":[56,9989],"collections":[],"class_list":{"0":"post-19926","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-qa-testing","8":"tag-kubernetes","9":"tag-linux","10":"entry"},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.9 (Yoast SEO v26.9) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to Solve the OOMKilled Error in Linux and Kubernetes<\/title>\n<meta name=\"description\" content=\"Read this step-by-step guide to identify what&#039;s causing the common OOMKilled Error in Linux and Kubernetes and how to solve this memory issue\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.codemotion.com\/magazine\/devops\/qa-testing\/what-is-the-oomkilled-error-in-linux-and-kubernetes-and-how-to-solve-it\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"What is the OOMKilled Error in Linux and Kubernetes and How to Solve It\" \/>\n<meta property=\"og:description\" content=\"Read this step-by-step guide to identify what&#039;s causing the common OOMKilled Error in Linux and Kubernetes and how to solve this memory issue\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.codemotion.com\/magazine\/devops\/qa-testing\/what-is-the-oomkilled-error-in-linux-and-kubernetes-and-how-to-solve-it\/\" \/>\n<meta property=\"og:site_name\" content=\"Codemotion Magazine\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/Codemotion.Italy\/\" \/>\n<meta property=\"article:published_time\" content=\"2023-01-13T08:00:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2023\/01\/iStock-1421195835.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1235\" \/>\n\t<meta property=\"og:image:height\" content=\"849\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Gilad David Maayan\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@gilad_maayan\" \/>\n<meta name=\"twitter:site\" content=\"@CodemotionIT\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Gilad David Maayan\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/devops\/qa-testing\/what-is-the-oomkilled-error-in-linux-and-kubernetes-and-how-to-solve-it\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/devops\/qa-testing\/what-is-the-oomkilled-error-in-linux-and-kubernetes-and-how-to-solve-it\/\"},\"author\":{\"name\":\"Gilad David Maayan\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#\/schema\/person\/b332cfa429cd83ccb5840d43315f28c5\"},\"headline\":\"What is the OOMKilled Error in Linux and Kubernetes and How to Solve It\",\"datePublished\":\"2023-01-13T08:00:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/devops\/qa-testing\/what-is-the-oomkilled-error-in-linux-and-kubernetes-and-how-to-solve-it\/\"},\"wordCount\":1236,\"publisher\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/devops\/qa-testing\/what-is-the-oomkilled-error-in-linux-and-kubernetes-and-how-to-solve-it\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2023\/01\/iStock-1421195835.jpg\",\"keywords\":[\"Kubernetes\",\"Linux\"],\"articleSection\":[\"QA\/Testing\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/devops\/qa-testing\/what-is-the-oomkilled-error-in-linux-and-kubernetes-and-how-to-solve-it\/\",\"url\":\"https:\/\/www.codemotion.com\/magazine\/devops\/qa-testing\/what-is-the-oomkilled-error-in-linux-and-kubernetes-and-how-to-solve-it\/\",\"name\":\"How to Solve the OOMKilled Error in Linux and Kubernetes\",\"isPartOf\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/devops\/qa-testing\/what-is-the-oomkilled-error-in-linux-and-kubernetes-and-how-to-solve-it\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/devops\/qa-testing\/what-is-the-oomkilled-error-in-linux-and-kubernetes-and-how-to-solve-it\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2023\/01\/iStock-1421195835.jpg\",\"datePublished\":\"2023-01-13T08:00:00+00:00\",\"description\":\"Read this step-by-step guide to identify what's causing the common OOMKilled Error in Linux and Kubernetes and how to solve this memory issue\",\"breadcrumb\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/devops\/qa-testing\/what-is-the-oomkilled-error-in-linux-and-kubernetes-and-how-to-solve-it\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.codemotion.com\/magazine\/devops\/qa-testing\/what-is-the-oomkilled-error-in-linux-and-kubernetes-and-how-to-solve-it\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/devops\/qa-testing\/what-is-the-oomkilled-error-in-linux-and-kubernetes-and-how-to-solve-it\/#primaryimage\",\"url\":\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2023\/01\/iStock-1421195835.jpg\",\"contentUrl\":\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2023\/01\/iStock-1421195835.jpg\",\"width\":1235,\"height\":849,\"caption\":\"Vector illustration material of a man worried in front of a laptop\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/devops\/qa-testing\/what-is-the-oomkilled-error-in-linux-and-kubernetes-and-how-to-solve-it\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.codemotion.com\/magazine\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"DevOps\",\"item\":\"https:\/\/www.codemotion.com\/magazine\/devops\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"QA\/Testing\",\"item\":\"https:\/\/www.codemotion.com\/magazine\/devops\/qa-testing\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"What is the OOMKilled Error in Linux and Kubernetes and How to Solve It\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#website\",\"url\":\"https:\/\/www.codemotion.com\/magazine\/\",\"name\":\"Codemotion Magazine\",\"description\":\"We code the future. Together\",\"publisher\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.codemotion.com\/magazine\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#organization\",\"name\":\"Codemotion\",\"url\":\"https:\/\/www.codemotion.com\/magazine\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/11\/codemotionlogo.png\",\"contentUrl\":\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/11\/codemotionlogo.png\",\"width\":225,\"height\":225,\"caption\":\"Codemotion\"},\"image\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/Codemotion.Italy\/\",\"https:\/\/x.com\/CodemotionIT\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#\/schema\/person\/b332cfa429cd83ccb5840d43315f28c5\",\"name\":\"Gilad David Maayan\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/aa7da1b7504794509c4f9347d4e7ea17f0b9ae2a84233ec171434f7c8511daf7?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/aa7da1b7504794509c4f9347d4e7ea17f0b9ae2a84233ec171434f7c8511daf7?s=96&d=mm&r=g\",\"caption\":\"Gilad David Maayan\"},\"description\":\"Gilad David Maayan is a technology writer who has worked with over 150 technology companies including SAP, Imperva, Samsung NEXT, NetApp and Ixia, producing technical and thought leadership content that elucidates technical solutions for developers and IT leadership. Today he heads Agile SEO, the leading marketing agency in the technology industry.\",\"sameAs\":[\"https:\/\/www.linkedin.com\/in\/giladdavidmaayan\/\",\"https:\/\/x.com\/gilad_maayan\"],\"url\":\"https:\/\/www.codemotion.com\/magazine\/author\/gilad-david-maayan\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Solve the OOMKilled Error in Linux and Kubernetes","description":"Read this step-by-step guide to identify what's causing the common OOMKilled Error in Linux and Kubernetes and how to solve this memory issue","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:\/\/www.codemotion.com\/magazine\/devops\/qa-testing\/what-is-the-oomkilled-error-in-linux-and-kubernetes-and-how-to-solve-it\/","og_locale":"en_US","og_type":"article","og_title":"What is the OOMKilled Error in Linux and Kubernetes and How to Solve It","og_description":"Read this step-by-step guide to identify what's causing the common OOMKilled Error in Linux and Kubernetes and how to solve this memory issue","og_url":"https:\/\/www.codemotion.com\/magazine\/devops\/qa-testing\/what-is-the-oomkilled-error-in-linux-and-kubernetes-and-how-to-solve-it\/","og_site_name":"Codemotion Magazine","article_publisher":"https:\/\/www.facebook.com\/Codemotion.Italy\/","article_published_time":"2023-01-13T08:00:00+00:00","og_image":[{"width":1235,"height":849,"url":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2023\/01\/iStock-1421195835.jpg","type":"image\/jpeg"}],"author":"Gilad David Maayan","twitter_card":"summary_large_image","twitter_creator":"@gilad_maayan","twitter_site":"@CodemotionIT","twitter_misc":{"Written by":"Gilad David Maayan","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.codemotion.com\/magazine\/devops\/qa-testing\/what-is-the-oomkilled-error-in-linux-and-kubernetes-and-how-to-solve-it\/#article","isPartOf":{"@id":"https:\/\/www.codemotion.com\/magazine\/devops\/qa-testing\/what-is-the-oomkilled-error-in-linux-and-kubernetes-and-how-to-solve-it\/"},"author":{"name":"Gilad David Maayan","@id":"https:\/\/www.codemotion.com\/magazine\/#\/schema\/person\/b332cfa429cd83ccb5840d43315f28c5"},"headline":"What is the OOMKilled Error in Linux and Kubernetes and How to Solve It","datePublished":"2023-01-13T08:00:00+00:00","mainEntityOfPage":{"@id":"https:\/\/www.codemotion.com\/magazine\/devops\/qa-testing\/what-is-the-oomkilled-error-in-linux-and-kubernetes-and-how-to-solve-it\/"},"wordCount":1236,"publisher":{"@id":"https:\/\/www.codemotion.com\/magazine\/#organization"},"image":{"@id":"https:\/\/www.codemotion.com\/magazine\/devops\/qa-testing\/what-is-the-oomkilled-error-in-linux-and-kubernetes-and-how-to-solve-it\/#primaryimage"},"thumbnailUrl":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2023\/01\/iStock-1421195835.jpg","keywords":["Kubernetes","Linux"],"articleSection":["QA\/Testing"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.codemotion.com\/magazine\/devops\/qa-testing\/what-is-the-oomkilled-error-in-linux-and-kubernetes-and-how-to-solve-it\/","url":"https:\/\/www.codemotion.com\/magazine\/devops\/qa-testing\/what-is-the-oomkilled-error-in-linux-and-kubernetes-and-how-to-solve-it\/","name":"How to Solve the OOMKilled Error in Linux and Kubernetes","isPartOf":{"@id":"https:\/\/www.codemotion.com\/magazine\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.codemotion.com\/magazine\/devops\/qa-testing\/what-is-the-oomkilled-error-in-linux-and-kubernetes-and-how-to-solve-it\/#primaryimage"},"image":{"@id":"https:\/\/www.codemotion.com\/magazine\/devops\/qa-testing\/what-is-the-oomkilled-error-in-linux-and-kubernetes-and-how-to-solve-it\/#primaryimage"},"thumbnailUrl":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2023\/01\/iStock-1421195835.jpg","datePublished":"2023-01-13T08:00:00+00:00","description":"Read this step-by-step guide to identify what's causing the common OOMKilled Error in Linux and Kubernetes and how to solve this memory issue","breadcrumb":{"@id":"https:\/\/www.codemotion.com\/magazine\/devops\/qa-testing\/what-is-the-oomkilled-error-in-linux-and-kubernetes-and-how-to-solve-it\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.codemotion.com\/magazine\/devops\/qa-testing\/what-is-the-oomkilled-error-in-linux-and-kubernetes-and-how-to-solve-it\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codemotion.com\/magazine\/devops\/qa-testing\/what-is-the-oomkilled-error-in-linux-and-kubernetes-and-how-to-solve-it\/#primaryimage","url":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2023\/01\/iStock-1421195835.jpg","contentUrl":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2023\/01\/iStock-1421195835.jpg","width":1235,"height":849,"caption":"Vector illustration material of a man worried in front of a laptop"},{"@type":"BreadcrumbList","@id":"https:\/\/www.codemotion.com\/magazine\/devops\/qa-testing\/what-is-the-oomkilled-error-in-linux-and-kubernetes-and-how-to-solve-it\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.codemotion.com\/magazine\/"},{"@type":"ListItem","position":2,"name":"DevOps","item":"https:\/\/www.codemotion.com\/magazine\/devops\/"},{"@type":"ListItem","position":3,"name":"QA\/Testing","item":"https:\/\/www.codemotion.com\/magazine\/devops\/qa-testing\/"},{"@type":"ListItem","position":4,"name":"What is the OOMKilled Error in Linux and Kubernetes and How to Solve It"}]},{"@type":"WebSite","@id":"https:\/\/www.codemotion.com\/magazine\/#website","url":"https:\/\/www.codemotion.com\/magazine\/","name":"Codemotion Magazine","description":"We code the future. Together","publisher":{"@id":"https:\/\/www.codemotion.com\/magazine\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.codemotion.com\/magazine\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.codemotion.com\/magazine\/#organization","name":"Codemotion","url":"https:\/\/www.codemotion.com\/magazine\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codemotion.com\/magazine\/#\/schema\/logo\/image\/","url":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/11\/codemotionlogo.png","contentUrl":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/11\/codemotionlogo.png","width":225,"height":225,"caption":"Codemotion"},"image":{"@id":"https:\/\/www.codemotion.com\/magazine\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/Codemotion.Italy\/","https:\/\/x.com\/CodemotionIT"]},{"@type":"Person","@id":"https:\/\/www.codemotion.com\/magazine\/#\/schema\/person\/b332cfa429cd83ccb5840d43315f28c5","name":"Gilad David Maayan","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codemotion.com\/magazine\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/aa7da1b7504794509c4f9347d4e7ea17f0b9ae2a84233ec171434f7c8511daf7?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/aa7da1b7504794509c4f9347d4e7ea17f0b9ae2a84233ec171434f7c8511daf7?s=96&d=mm&r=g","caption":"Gilad David Maayan"},"description":"Gilad David Maayan is a technology writer who has worked with over 150 technology companies including SAP, Imperva, Samsung NEXT, NetApp and Ixia, producing technical and thought leadership content that elucidates technical solutions for developers and IT leadership. Today he heads Agile SEO, the leading marketing agency in the technology industry.","sameAs":["https:\/\/www.linkedin.com\/in\/giladdavidmaayan\/","https:\/\/x.com\/gilad_maayan"],"url":"https:\/\/www.codemotion.com\/magazine\/author\/gilad-david-maayan\/"}]}},"featured_image_src":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2023\/01\/iStock-1421195835-600x400.jpg","featured_image_src_square":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2023\/01\/iStock-1421195835-600x600.jpg","author_info":{"display_name":"Gilad David Maayan","author_link":"https:\/\/www.codemotion.com\/magazine\/author\/gilad-david-maayan\/"},"uagb_featured_image_src":{"full":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2023\/01\/iStock-1421195835.jpg",1235,849,false],"thumbnail":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2023\/01\/iStock-1421195835-150x150.jpg",150,150,true],"medium":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2023\/01\/iStock-1421195835-300x206.jpg",300,206,true],"medium_large":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2023\/01\/iStock-1421195835-768x528.jpg",768,528,true],"large":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2023\/01\/iStock-1421195835-1024x704.jpg",1024,704,true],"1536x1536":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2023\/01\/iStock-1421195835.jpg",1235,849,false],"2048x2048":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2023\/01\/iStock-1421195835.jpg",1235,849,false],"small-home-featured":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2023\/01\/iStock-1421195835.jpg",100,69,false],"sidebar-featured":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2023\/01\/iStock-1421195835-180x128.jpg",180,128,true],"genesis-singular-images":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2023\/01\/iStock-1421195835-896x504.jpg",896,504,true],"archive-featured":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2023\/01\/iStock-1421195835-400x225.jpg",400,225,true],"gb-block-post-grid-landscape":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2023\/01\/iStock-1421195835-600x400.jpg",600,400,true],"gb-block-post-grid-square":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2023\/01\/iStock-1421195835-600x600.jpg",600,600,true]},"uagb_author_info":{"display_name":"Gilad David Maayan","author_link":"https:\/\/www.codemotion.com\/magazine\/author\/gilad-david-maayan\/"},"uagb_comment_info":0,"uagb_excerpt":"What is the OOMKilled Error? OOMKilled is a common error in Linux operating systems. Linux systems have a program called Out of Memory Manager (OOM) that tracks the memory usage of each process. If your system is in danger of running out of available memory, the OOM Killer will appear and attempt to kill processes,&#8230;&hellip;","lang":"en","_links":{"self":[{"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/posts\/19926","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/users\/100"}],"replies":[{"embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/comments?post=19926"}],"version-history":[{"count":4,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/posts\/19926\/revisions"}],"predecessor-version":[{"id":19934,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/posts\/19926\/revisions\/19934"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/media\/19929"}],"wp:attachment":[{"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/media?parent=19926"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/categories?post=19926"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/tags?post=19926"},{"taxonomy":"collections","embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/collections?post=19926"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}