Skip to content
Latchkey

Exit Code 137 (Out of Memory) on Azure Pipelines - Causes and Fixes

Exit Code 137 (Out of Memory) is an infrastructure failure, not a bug in your code - here is the Azure Pipelines-specific fix.

What this error means

A step or job ends with exit code 137 and often just the word Killed. The process received SIGKILL - on CI runners, almost always the out-of-memory killer.

Azure Pipelines log
Killed
Process completed with exit code 137.

Common causes

The job exceeded the available memory

Bundlers, compilers, and test suites can spike past the runner memory ceiling; the kernel OOM killer terminates the heaviest process with SIGKILL.

A container/heap limit is too low

An explicit memory limit (or a too-small language heap) makes the process hit the wall sooner.

How to fix it

Give it more resources on Azure Pipelines

Use a larger Microsoft-hosted agent or a self-hosted agent with more memory; standard hosted agents are modest.

Reduce peak usage

Lower build/test parallelism and cap language heaps (e.g. NODE_OPTIONS=--max-old-space-size) below the runner limit.

How to prevent it

  • Right-size Azure Pipelines runners/agents for the job.
  • Cache dependencies to cut time, memory pressure, and network calls.
  • Use self-healing runners that retry transient and mechanical failures automatically.

Frequently asked questions

What causes "Exit code 137 on Azure Pipelines"?
Bundlers, compilers, and test suites can spike past the runner memory ceiling; the kernel OOM killer terminates the heaviest process with SIGKILL.
How do I fix Exit code 137 on Azure Pipelines?
Use a larger Microsoft-hosted agent or a self-hosted agent with more memory; standard hosted agents are modest.
Can Latchkey fix this automatically?
Yes. Latchkey runs your GitHub Actions on managed runners that detect this failure, apply the fix, and retry the job automatically - self-healing is on by default.

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card