Software Development

Why does the Linux kernel kill automated containers that have no defined memory caps?

MA Asked by Matthew Long · 19-09-2025
0 upvotes 11,070 views 0 comments
The question

We are migrating microservices to production. During load tests, these automated containerized applications crash constantly without memory caps, showing an exit code of 137. I want to understand how the OS decides to terminate these specific processes and how to safeguard our infrastructure.

3 answers

0
AN
Answered on 22-09-2025

Exit code 137 explicitly indicates that your process was terminated by an external SIGKILL signal, which in this scenario is triggered by the kernel's Out-Of-Memory management system. When your automated containerized applications crash constantly without memory caps, they are exceeding safe operational thresholds of the node. The kernel uses an internal scoring algorithm based on memory usage percentages and process priority to choose a target. Uncapped containers running non-essential tasks are almost always selected first for immediate termination.

0
GA
Answered on 25-09-2025

Could adjusting the OOM score adjust value for the container runtimes temporarily prevent these aggressive terminations in your testing cluster?

KE 27-09-2025

Modifying the score might delay the termination, Gary, but it is highly risky. If the kernel cannot kill the runaway container, it will start terminating vital system daemons instead, which can lead to a complete drop of the entire physical node.

0
DE
Answered on 30-09-2025

An exit code of 137 is a definitive sign of memory starvation. Defining strict resource boundaries is the only permanent solution available.

MA 01-10-2025

Well said, Deborah. Standardizing your deployment templates with uniform constraints removes the guesswork and keeps the environment stable.

Share your thoughts

Your email address will not be published. Required fields are marked (*)

Professional Counselling Session

Still have questions?
Schedule a free counselling session

Our experts are ready to help you with any questions about courses, admissions, or career paths. Get personalized guidance from industry professionals.

Request a Call Back

Search Online

We Accept

We Accept

Follow Us

"PMI®", "PMBOK®", "PMP®", "CAPM®" and "PMI-ACP®" are registered marks of the Project Management Institute, Inc. | "CSM", "CST" are Registered Trade Marks of The Scrum Alliance, USA. | COBIT® is a trademark of ISACA® registered in the United States and other countries.

Book Free Session