Home › DevOps › Exit Code 143 Explained: SIGTERM in Docker, Kubernetes and YARN (and How It Differs from 137)
Intermediate 3 min · November 21, 2026

Exit Code 143 Explained: SIGTERM in Docker, Kubernetes and YARN (and How It Differs from 137)

Exit code 143 is 128 + 15: the process received SIGTERM and stopped.

N
Naren Founder & Principal Engineer

20+ years shipping production infrastructure and CI/CD at scale. Lessons pulled from things that broke in production.

Follow
✓ Production
production tested
November 21, 2026
last updated
2,136
articles · all by Naren
Before you start⏱ 7 min
  • ✓Basic Linux processes
  • ✓Docker or Kubernetes basics
 ● Production Incident 🔎 Debug Guide
⚡Quick Answer
  • 143 = 128 + 15 = SIGTERM: asked to stop.
  • 137 = 128 + 9 = SIGKILL: forced (often after the grace period, or OOM-killed).
  • Kubernetes: failing liveness probe, rollout, scale-down, node drain, eviction.
  • YARN/Spark: 'Container killed on request. Exit code is 143' — over memory limits or preempted.
  • Slow startup killed by liveness? Add a startupProbe.
  • Handle SIGTERM: finish in-flight work and exit within terminationGracePeriodSeconds.
  • Use exec-form ENTRYPOINT so Java is PID 1 and receives the signal.
✦ Definition~90s read
What is Exit Code 143?

When a process is ended by a signal, shells and container runtimes report exit code 128 + the signal number. SIGTERM is signal 15, so 143 means the process was asked to terminate. 137 (128 + 9) means it was force-killed with SIGKILL.

★
143 is someone tapping you on the shoulder and saying 'time to go'.
Plain-English First

143 is someone tapping you on the shoulder and saying 'time to go'. 137 is being carried out. Neither means your code crashed; something outside decided to stop it.

The payments pod restarted every two minutes with exit code 143 and no stack trace. Nothing crashed: the liveness probe was killing it before it finished starting.

Where 143 Comes From

Exit codes above 128 mean 'killed by signal (code - 128)'.

signals.shBASH
1
2
3
kill -l 15   # TERM
echo $((143 - 128))   # 15
echo $((137 - 128))   # 9
🎯 Key Takeaway
143 = SIGTERM, 137 = SIGKILL.

Kubernetes: Probes and Rollouts

Look at the pod's events to see why the kubelet stopped it.

k8s.shBASH
1
2
3
kubectl describe pod payments | grep -A5 -i events
# Warning  Unhealthy  Liveness probe failed: connection refused
# Normal   Killing    Container payments failed liveness probe, will be restarted
🎯 Key Takeaway
Events tell you who.

Slow Start? Add a startupProbe

Liveness and readiness probes don't run until the startup probe succeeds.

deploy.yamlYAML
1
2
3
4
5
6
7
startupProbe:
  httpGet: { path: /health, port: 8080 }
  failureThreshold: 12
  periodSeconds: 10      # up to 120 s
livenessProbe:
  httpGet: { path: /health, port: 8080 }
  periodSeconds: 10
🎯 Key Takeaway
Give slow apps time to start.

Shut Down Gracefully

On SIGTERM, stop accepting work, finish what's in flight, and exit before terminationGracePeriodSeconds (default 30 s), or you'll be SIGKILLed (137). Use exec form so Java receives the signal.

DockerfileDOCKERFILE
1
2
ENTRYPOINT ["java", "-jar", "app.jar"]   # exec form: java is PID 1
# not: ENTRYPOINT java -jar app.jar        (shell form: sh gets the signal)
🎯 Key Takeaway
Exec form + graceful shutdown.
● Production incidentPOST-MORTEMseverity: high

Killed Before It Was Ready

Symptom
kubectl describe showed Last State: Terminated, Exit Code: 143; app logs ended mid-startup with no error.
Assumption
The team looked for a crash in the application.
Root cause
The app needed ~60 seconds to start (cache warm-up). The liveness probe began at 10 s and failed after three 10 s checks, so the kubelet sent SIGTERM at ~30 s.
Fix
Added a startupProbe allowing 120 s; liveness only runs after startup succeeds.
Key lesson
  • 143 means asked to stop.
  • Find who sent the signal.
  • Use startupProbe for slow starts.
Production debug guideCheck the platform, not the app3 entries
Symptom · 01
Kubernetes restarts with 143
→
Fix
kubectl describe pod: look at Events for 'Liveness probe failed' or 'Killing'.
Symptom · 02
YARN 'Container killed on request. Exit code is 143'
→
Fix
Check container memory vs limits and the ResourceManager for preemption.
Symptom · 03
143 during deploys
→
Fix
Normal rollout; make shutdown graceful.
⚙ Quick Reference
4 commands from this guide
FileCommand / CodePurpose
signals.shkill -l 15 # TERMWhere 143 Comes From
k8s.shkubectl describe pod payments | grep -A5 -i eventsKubernetes
deploy.yamlstartupProbe:Slow Start? Add a startupProbe
DockerfileENTRYPOINT ["java", "-jar", "app.jar"] # exec form: java is PID 1Shut Down Gracefully

Key takeaways

1
143 = SIGTERM.
2
137 = SIGKILL.
3
Find who sent it.
4
startupProbe for slow starts.
5
Handle SIGTERM.

Common mistakes to avoid

3 patterns
×

Searching app logs for a crash

Symptom
Nothing found.
Fix
Check platform events.
×

Liveness probe on a slow-starting app

Symptom
Restart loop with 143.
Fix
startupProbe.
×

Shell-form ENTRYPOINT

Symptom
No graceful shutdown, then 137.
Fix
Exec form.
INTERVIEW PREP · PRACTICE MODE

Interview Questions on This Topic

Q01SENIOR
What do exit codes 143 and 137 mean?
Q01 of 01SENIOR

What do exit codes 143 and 137 mean?

ANSWER
143: terminated by SIGTERM. 137: killed by SIGKILL, e.g. after the grace period or by the OOM killer.
FAQ · 3 QUESTIONS

Frequently Asked Questions

01
What does exit code 143 mean?
02
Container killed on request. Exit code is 143 in YARN?
03
Is exit code 143 an error?
N
Naren Founder & Principal Engineer

20+ years shipping production infrastructure and CI/CD at scale. Lessons pulled from things that broke in production.

Follow
✓ Verified
production tested
November 21, 2026
last updated
2,136
articles · all by Naren
🔥

That's Platform. Mark it forged?

3 min read · try the examples if you haven't

←
Previous
Windows Error 0x80073CF3: Package Failed Dependency Validation
4 / 4 · Platform
Next
Claude Code Agent Workflow for Engineers
→