Kill JobsΒΆ

Each executed sql statement results in a corresponding job. Jobs that are currently executing are logged in the system table sys.jobs (see Jobs, Operations, and Logs).

To obtain the UUID of a job, stats needs to be enabled (see Collecting Stats). Job logging can be disabled by setting the queue size to zero.

Killing an active job forces CrateDB to stop its execution on the cluster immediately. There are two different SQL commands available for killing jobs.

The KILL ALL statement stops every single job on each node that is running. It returns the total number of contexts of all jobs that have been killed. A job can have contexts on multiple nodes.

cr> kill all;
KILL OK, ... rows affected (... sec)

KILL job_id kills one single job with the specified job_id. Like KILL ALL it returns the total number of contexts of that job killed on all nodes.

cr> kill '175011ce-9bbc-45f2-a86a-5b7f993a93a6';
KILL OK, ... rows affected (... sec)

See KILL for detailed syntax information on KILL statements.