Skip to content
Latchkey

GitHub Actions "The runner has received a shutdown signal" / Lost Connection

A job died because the runner lost its connection to GitHub partway through - the host crashed, was OOM-killed, a spot instance was reclaimed, or the network dropped. The job is marked canceled or failed without a clean error.

What this error means

A running job stops abruptly with "The operation was canceled" or "lost communication with the server", often after a period of no output. Re-running frequently succeeds, which points to an infrastructure blip.

Actions log
The runner has received a shutdown signal.
The operation was canceled.
# or
Error: The self-hosted runner lost communication with the server.

Common causes

Host crashed, OOM-killed, or spot-reclaimed

If the runner VM runs out of memory, panics, or is a spot/preemptible instance that gets reclaimed, the agent dies mid-job and GitHub reports lost communication.

Transient network drop

A brief loss of outbound connectivity breaks the runner long-poll. GitHub cancels the job once the heartbeat is gone for too long.

How to fix it

Add retries and right-size the host

  1. Re-run failed jobs; transient drops usually pass on retry.
  2. Give memory-heavy jobs a larger runner so they are not OOM-killed.
  3. For spot/preemptible runners, handle reclaim with an autoscaler that re-queues the job.

Harden the runner connection

Ensure stable outbound HTTPS and keep the runner agent updated so it reconnects cleanly after blips.

How to prevent it

  • Right-size runners so memory-heavy jobs do not OOM the host.
  • Use stable on-demand runners for critical jobs, or auto-retry on spot reclaim.
  • Monitor runner host health (memory, network) alongside job logs.

Frequently asked questions

What causes "Runner lost connection"?
If the runner VM runs out of memory, panics, or is a spot/preemptible instance that gets reclaimed, the agent dies mid-job and GitHub reports lost communication.
How do I fix Runner lost connection?
Add retries and right-size the host
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