Skip to content
Latchkey

Nx "Daemon process exited unexpectedly" in CI

Nx runs a background daemon to speed up graph computation. On CI runners it can be killed by memory limits or a terminating container, and Nx reports the daemon exited. Disabling the daemon in CI avoids the crash.

What this error means

Nx prints "Daemon process exited unexpectedly" or reports the daemon connection was lost, sometimes with intermittent graph failures on the same commit.

Nx
NX   Daemon process exited unexpectedly with "SIGKILL"
Nx Daemon it not running or failed to start.

Common causes

The runner killed the daemon under memory pressure

A constrained CI container OOM-kills the daemon, so Nx loses its connection mid-run.

The daemon adds no value in a fresh CI job

The daemon speeds up repeated local runs; a single CI job that runs once gains little and is more exposed to being killed.

How to fix it

Disable the daemon in CI

Set NX_DAEMON=false so Nx computes the graph in-process and cannot lose a daemon connection.

.github/workflows/ci.yml
env:
  NX_DAEMON: 'false'

Reset if the daemon state is stale

  1. Run nx reset to stop the daemon and clear its state.
  2. Re-run with NX_DAEMON=false for the CI job.
  3. Keep the daemon on locally where it helps.
Terminal
nx reset

How to prevent it

  • Set NX_DAEMON=false for CI jobs by default.
  • Give the runner enough memory if you keep the daemon on.
  • Use nx reset when upgrading Nx to avoid stale daemon state.

Frequently asked questions

What causes ""Daemon process ... exited""?
A constrained CI container OOM-kills the daemon, so Nx loses its connection mid-run.
How do I fix "Daemon process ... exited"?
Set NX_DAEMON=false so Nx computes the graph in-process and cannot lose a daemon connection.

Related guides

References

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