LiveKit Cloud is likely classifying a normal idle SIGTERM shutdown of the cloud hosted Node agent as Error

Is this a known issue? Looks like LiveKit Cloud is classifying a normal idle SIGTERM shutdown of the Node agent as Error because the SDK exits 143, showing current status on dashboard as ‘Error’ even though operationally the worker is healthy and wakes correctly and working as intended.

Could you send some logs? I’ll take a look

Hi @ngolitech. Are you running the Node (agents-js) SDK? This is likely the default SIGTERM behavior in Node.js rather than an actual error

When a Node process receives SIGTERM without an explicit handler that calls process.exit(0), it exits with code 143 (128 + 15). That’s just Unix signal math, not a crash. But LiveKit Cloud flags any non-zero exit as “Error” on the dashboard

Quick fix is to trap the signal yourself:

process.on('SIGTERM', async () => {
  await worker.drain();
  process.exit(0);
});

A couple of clarifying questions:

  1. Are you deploying on LiveKit Cloud or self-hosted (K8s)?
  2. Is this happening on idle scale-down specifically, or also after active sessions end?

I am curious to see if this fix works, maybe it worths an Issue on Github to improve how the lib handles it