Urgent.News

What's breaking now, across thousands of outlets.

Tech

How an Unpinned Base Image Tag Let V8 Size Its Heap Off the Host, Not the Pod

14:47 UTC, Tuesday. Pods in the checkout-api deployment start OOMKilling in a loop, three or four at a time, in the middle of an ordinary afternoon. Traffic is flat. No deploy went out today. PagerDuty fires on KubePodCrashLooping , not on anything tied to a release, because as far as the deploy history shows, nothing was released. the scramble First theory: a memory leak shipped yesterday and…

On a Tuesday, pods within the checkout-api deployment began undergoing multiple OOMKilling incidents. Traffic was stable, and no new releases had been deployed. The initial suspicion was a memory leak introduced the previous day, taking a day to accumulate enough pressure to impact pod performance. The git log for the past 48 hours revealed just one commit, a routine lockfile refresh unrelated to application code changes.

Traffic rates remained consistent with the previous Tuesday, indicating the issue was not related to increased load. Another theory suggested a slow leak crossing a threshold, but the heapUsed metric remained constant at 140MB, while the rss grew steadily past 480MB, exceeding the pod's 512MB limit. V8's heap accounting did not reflect this growth.

The root cause was traced to a change in the base image used by the deployment. The Dockerfile initially used a floating tag, FROM node:18-alpine, but the nightly CI rebuild process fetched the latest available version, causing V8 to size its heap incorrectly based on the host's total memory instead of the pod's 512MB limit. This discrepancy allowed V8 to commit excessive memory, leading to OOMKilling.

To resolve the issue, the base image should be pinned to a specific digest, ensuring consistent builds and preventing silent changes. Additionally, the heap ceiling should be explicitly set to the pod's memory limit, preventing V8 from misinterpreting the available resources. Finally, the CI job should be updated to fail if the base image line is not pinned, preventing similar issues in the future.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Used enterprise SSDs & SAS drives: what to check before buying

Enterprise storage is one of the best places to buy used. Enterprise SSDs and SAS drives are built for 24/7 duty cycles, have far higher endurance than consumer parts, and depreciate hard once a data…

  • Verify drive compatibility with system before purchasing
  • Check SMART data and power-on hours using smartctl or nvme commands
  • Prefer resellers who test and reset drives for reliability

More from Friday 23 October →