Link Search Menu Expand Document
Start for Free

Process Management

This page discusses the details of process management in Stardog.

Page Contents
  1. Overview
  2. Listing Processes
  3. Terminating a Process
  4. Security and Process Management


When Stardog is performing long-running operations, there are three main things an administrator is interested in:

  • Which operations are taking up resources.
  • Learning roughly how long these operations are going to take.
  • Cancelling operations if they are taking too long or blocking other operations.

The unified process management API offers a single view on all types of long running operations in Stardog. We use the term Process to refer to a long-running operation in Stardog; we do not refer to OS processes. The unified process management API complements the existing mechanisms for transactions and queries. Processes which can be managed through this API include Queries, Transactions, Database Creation, Backups, Database Optimize, and many more. While some types of processes will report estimated progress, Queries and Transactions will not.

Process management includes support for:

  • Listing running processes.
  • Terminating running processes.
  • Reading the status of a running process.

Listing Processes

To see all running processes from the command line, use the ps list command:

$ stardog-admin ps list

The results are returned in tabular format:

|                 Process ID                  |  Database   | User  |       Type        | Elapsed time |   Status    |       Progress       |
| 8cc95209-a649-4e36-aa6c-a5a9a72832e7        | myDatabase  | admin | Transaction       | 00:03:15.672 | Terminating | N/A                  |
| internal-DatabaseCreation-admin-myDatabase2 | myDatabase2 | admin | Database Creation | 00:00:12.074 | Running     | Parsing data (65.8%) |

2 process(es) running.

Depending on the type of process, a progress stage might be shown (“Parsing data” in this instance). Some user actions might spawn more than one process. Usually these processes are related, and canceling one will cancel the other(s). This can be the case for database optimization and other operations.

Terminating a Process

To terminate a running process, simply pass its ID to the process kill command:

$ stardog-admin ps kill 8cc95209-a649-4e36-aa6c-a5a9a72832e7

Security and Process Management

The security model for process management is simple: any user can kill any running process submitted by that user, and a superuser can kill any running process. The same general restriction is applied to process status; you cannot see status for a process that you do not own, and a superuser can see the status of every process.