Skip to content
Latchkey

GitHub Actions "The runner has received a shutdown signal" in CI

The runner process was told to shut down while a job was in flight. Something outside the job - a preemption, an autoscaler scale-down, or host maintenance - asked the runner to stop, so the job was cut off.

What this error means

A job ends with The runner has received a shutdown signal, often alongside The operation was canceled and an exit code of 143 (SIGTERM). The work was progressing normally and was stopped from outside. A retry on fresh capacity completes it.

CI log
The runner has received a shutdown signal. This indicates the runner
service or host machine is being stopped.
##[error] The operation was canceled.

Common causes

The host was preempted or scaled down

A spot/preemptible instance reclaim, or an autoscaler removing idle-looking capacity, sends the runner a shutdown signal mid-job. It is an infrastructure event, not a build failure.

Maintenance or a fleet rotation

A deploy rotating the runner fleet, or planned host maintenance, stops the runner service gracefully, ending the in-flight job.

How to fix it

Retry on stable capacity

  1. Re-run the job - a shutdown signal is transient and a fresh runner usually finishes it.
  2. For jobs that must not be interrupted, use on-demand (non-preemptible) capacity.
  3. Keep jobs short and checkpointable so a mid-job stop costs little to redo.

Handle the signal gracefully

Trap SIGTERM so the job flushes logs/artifacts before exiting, making the retry cleaner.

Terminal
trap 'echo "shutdown signal received; cleaning up"; cleanup; exit 143' TERM

How to prevent it

  • Use on-demand capacity for jobs that cannot tolerate preemption.
  • Make jobs idempotent and checkpointable so retries are cheap.
  • Schedule fleet rotations/maintenance to avoid interrupting long jobs.

Frequently asked questions

What causes ""The runner has received a shutdown signal""?
A spot/preemptible instance reclaim, or an autoscaler removing idle-looking capacity, sends the runner a shutdown signal mid-job. It is an infrastructure event, not a build failure.
How do I fix "The runner has received a shutdown signal"?
Retry on stable capacity
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