Sourcegraph DocsSourcegraph Docs
  • Code Intelligence

    • Cody
    • Code Search
  • Code Management

    • Batch Changes
    • Code Monitoring
    • Code Ownership
    • Code Insights
    • Notebooks
  • Platform

    • Sourcegraph Admin
    • Sourcegraph Cloud
    • Integrations
  • CLI & API

    • Sourcegraph CLI
    • Sourcegraph GraphQL API
    • Sourcegraph Stream API
  • Help & Support

    • SLAs & Premium Support
    • Tutorials
    • Sourcegraph Accounts
    • Changelog
  1. Docs
  2. admin
  3. executors
  4. executors_config

Executor configuration

The following is a list of all of the configuration options for the executor service. The process for configuring your executor instance will vary depending on the executor deployment method selected, but are generally defined as environment variables either in the executor Docker container or directly on the host machine, depending on whether the service is running in Docker or as a native Linux binary.

Configuration KeyDescriptionExample value
EXECUTOR_FRONTEND_URLThe external URL of the Sourcegraph instance. requiredhttp://sourcegraph.example.com
EXECUTOR_FRONTEND_PASSWORDThe shared secret configured in the Sourcegraph instance site config under executors.accessToken. requiredour-shared-secret
EXECUTOR_QUEUE_NAMEThe name of a single queue to pull jobs from. Possible values: batches and codeintel. required: either this or EXECUTOR_QUEUE_NAMESbatches
EXECUTOR_QUEUE_NAMESThe names of multiple queues to pull jobs from, comma-separated. Possible values: batches and codeintel. required: either this or EXECUTOR_QUEUE_NAMEbatches,codeintel
EXECUTOR_USE_FIRECRACKERWhether to isolate jobs in virtual machines. Requires ignite and firecracker. Linux hosts only. Kubernetes is not supported. (default value: "true" when OS is Linux and not on Kubernetes)true
EXECUTOR_MAXIMUM_NUM_JOBSNumber of virtual machines or containers that can be running at once. (default value: "1")1
EXECUTOR_MAXIMUM_RUNTIME_PER_JOBThe maximum wall time that can be spent on a single job. (default value: "30m")30m
EXECUTOR_JOB_MEMORYHow much memory to allocate to each virtual machine or container. A value of zero sets no resource bound (in Docker, but not VMs). (default value: "12G")12G
EXECUTOR_JOB_NUM_CPUSHow many CPUs to allocate to each virtual machine or container. A value of zero sets no resource bound (in Docker, but not VMs). (default value: "4")4
EXECUTOR_DOCKER_REGISTRY_MIRROR_URLThe address of a docker registry mirror to use in firecracker VMs.http://10.0.0.2:5000
EXECUTOR_FIRECRACKER_DISK_SPACEHow much disk space to allocate to each virtual machine. (default value: "20G")20G
EXECUTOR_FIRECRACKER_BANDWIDTH_EGRESSHow much bandwidth to allow for egress packets to the VM in bytes/s. (default value: "524288000")524288000
EXECUTOR_FIRECRACKER_BANDWIDTH_INGRESSHow much bandwidth to allow for ingress packets to the VM in bytes/s. (default value: "524288000")524288000
EXECUTOR_KEEP_WORKSPACESWhether to skip deletion of workspaces after a job completes (or fails). Note that when Firecracker is enabled that the workspace is initially copied into the VM, so modifications will not be observed. (default value: "false")true
EXECUTOR_MAX_ACTIVE_TIMEThe maximum time that can be spent by the worker dequeueing records to be handled. (default value: "0")100m
EXECUTOR_NUM_TOTAL_JOBSThe maximum number of jobs that will be dequeued by the worker. (default value: "0")100
EXECUTOR_DOCKER_HOST_MOUNT_PATHThe target workspace as it resides on the Docker host (used to enable Docker-in-Docker)./workspaces
EXECUTOR_QUEUE_POLL_INTERVALInterval between dequeue requests. (default value: "1s")1s
EXECUTOR_CLEANUP_TASK_INTERVALThe frequency with which to run periodic cleanup tasks. (default value: "1m")1m
EXECUTOR_VM_PREFIXA name prefix for virtual machines controlled by this instance. (default value: "executor")executor
EXECUTOR_VM_STARTUP_SCRIPT_PATHA path to a file on the host that is loaded into a fresh virtual machine and executed on startup./vm-startup.sh
NODE_EXPORTER_URLThe URL of the node_exporter instance, without the /metrics path.http://127.0.0.1:9000
EXECUTOR_FIRECRACKER_IMAGEThe base image to use for virtual machines.sourcegraph/executor-vm:insiders
EXECUTOR_FIRECRACKER_KERNEL_IMAGEThe base image containing the kernel binary to use for virtual machines.sourcegraph/ignite-kernel:5.10.135-amd64
EXECUTOR_FIRECRACKER_SANDBOX_IMAGEThe OCI image for the ignite VM sandbox.sourcegraph/ignite:v0.10.5
DOCKER_REGISTRY_NODE_EXPORTER_URLThe URL of the Docker Registry instance's node_exporter, without the /metrics path.http://localhost:9000
SRC_LOG_LEVELupper log level to restrict log output to (dbug, info, warn, error, crit) (default value: "warn")warn

On this page

  1. Executor configuration

Edit this page on GitHub