Configuration
This page is a guided map of what the Enterprise binary lets you tune. For OIDC and the BPMN engine, see the dedicated pages.
Configuration file
The backend loads its YAML config:
| Variable | Purpose |
|---|---|
CONFIG_FILE | Absolute path to a config file. The image sets it to its bundled conf-enterprise.yaml. Unset, configuration comes from environment variables alone. |
Precedence is environment variable → YAML value → built-in default. So any field documented below as having an environment-variable name can be overridden at runtime without touching the YAML file.
A zero or false in the YAML file reads as unset, so the field keeps its built-in default. Where a setting below takes 0 or false, set it as an environment variable, such as ENGINE_RETENTION_MAX_AGE=0s or OTLP_INSECURE=false. The Helm chart passes its values as environment variables, so a zero there takes effect.
REST API
The HTTP server that serves both the REST API and (optionally) the metrics endpoint.
| Variable | Default | Purpose |
|---|---|---|
REST_API_PORT | 8080 | Public API listen port. |
REST_API_CONTEXT | / | URL prefix. Set to e.g. /api/v1 when sitting behind a path-based reverse proxy. |
REST_READ_TIMEOUT | 30s | HTTP request read timeout. |
REST_WRITE_TIMEOUT | 60s | HTTP response write timeout. A worker's long poll is held for at most this minus 5 seconds. |
REST_IDLE_TIMEOUT | 120s | Keep-alive idle connection timeout. |
REST_MAX_HEADER_BYTES | 1 MiB | Max request header size. |
REST_MAX_BODY_BYTES | 5 MiB | Max request body size. Raise if you deploy large BPMN/DMN XML uploads. |
REST_ALLOWED_CORS_ORIGINS | - | Comma-separated CORS origin allowlist. Set to your SPA origin(s) in production. Wildcard is not supported. |
REST_ALLOWED_WS_ORIGINS | - | Comma-separated WebSocket origin allowlist (used by the FEEL editor's LSP). |
REST_METRICS_PORT | 9464 | Prometheus /metrics endpoint port. Separate HTTP server from the API. 0 turns the metrics server off. |
REST_METRICS_ADDR | empty (all interfaces) | Bind address for the metrics server. Set to 127.0.0.1 to keep telemetry off ingress, or firewall the port. |
REST_SHUTDOWN_DRAIN_DELAY | 5s | How long a stopping replica keeps serving after it reports not ready, so load balancers stop sending it traffic first. |
REST_SHUTDOWN_TIMEOUT | 30s | Bounds the HTTP drain that follows the drain delay. Parked job polls are answered first, then the engine stops stepping and hands its partitions to the other replicas, which run any step it had in flight again. Keep the drain delay plus this timeout under the pod's terminationGracePeriodSeconds (60 in the Helm chart). |
Database
Connection settings for PostgreSQL. Internal schema migrations run automatically on every startup - there is no separate migration step.
| Variable | Default | Purpose |
|---|---|---|
DB_HOST | postgres | PostgreSQL hostname. localhost without a config file. |
DB_PORT | 5432 | PostgreSQL port. |
DB_USER | quantum | PostgreSQL user. dmn without a config file. |
DB_PASSWORD | quantum | PostgreSQL password. dmn without a config file. |
DB_NAME | quantum | Database name. dmn without a config file. |
DB_SSLMODE | disable | disable, require, verify-ca, or verify-full. |
DB_MAX_CONNS | 200 | pgxpool max connections, shared by every project and the BPMN engine in the process. The Helm chart sets 80 per pod. Keep ENGINE_STEP_WORKERS well under it. |
DB_MIN_CONNS | 5 | pgxpool min connections kept warm. |
DB_URL | unset | A postgres:// connection URL that replaces DB_HOST, DB_PORT, DB_USER, DB_PASSWORD, DB_NAME and DB_SSLMODE, for settings they do not cover, such as several hosts with target_session_attrs=read-write. DB_MAX_CONNS and DB_MIN_CONNS still apply unless the URL sets pool_max_conns or pool_min_conns. |
Every connection, to the app database and to each shard, detects a peer that stops answering on its own. The defaults below apply to every URL, and the URL's libpq keys of the same name override them. The backend applies these keys to its sockets and does not send them to the server.
| URL key | Default | Purpose |
|---|---|---|
connect_timeout | 5 | Seconds a new connection may take, TLS and authentication included. |
tcp_user_timeout | 15000 | Milliseconds sent data may stay unacknowledged before the connection fails. 0 keeps the system default, about 15 minutes on Linux. |
keepalives | 1 | 0 turns TCP keepalives off. |
keepalives_idle | 10 | Seconds of silence before the first keepalive probe. 0 keeps the system default. |
keepalives_interval | 5 | Seconds between unanswered probes. 0 keeps the system default. |
keepalives_count | 3 | Unanswered probes before the connection fails. 0 keeps the system default. |
A statement waiting on a server that went away, or on a proxy that stopped forwarding, fails within these limits, and the engine runs the step again once the database answers. See High availability.
OIDC
See Authentication for the full picture. The eight tunable variables are OIDC_ISSUER, OIDC_CLIENT_ID, OIDC_AUDIENCES, OIDC_ROLES_CLAIM, OIDC_PROJECTS_CLAIM, OIDC_USER_CLAIM, OIDC_SCOPES and OIDC_RESPONSE_TYPE (the response type the console requests, code by default).
License and projects
| Variable | Default | Purpose |
|---|---|---|
LICENSE_KEY | - | The signed license JWT. Required. See Deployment → License key. |
PROVISIONING_PATH | projects.yaml | The projects file the backend reads on every start. See Deployment → Project provisioning. |
BPMN engine
See Engine for how the engine runs and the full list of ENGINE_* settings: the partition count, shards, step workers, poll interval, definition cache, call depth, job retry delay and worker locks. Scaling the engine covers the shard settings. The retention settings are below.
Caching
Access cache - caches which project UUIDs are provisioned so request routing doesn't hit the database on every call. Role and membership are read from the JWT every request and are not cached.
| Variable | Default | Purpose |
|---|---|---|
ACCESS_CACHE_TTL | 300s | Cache entry time-to-live. 30s without a config file. Pure performance knob - see Operations → Access cache. |
The engine keeps the deployed DMN versions it evaluates parsed and compiled in memory, since a deployed version never changes. ENGINE_DEFINITION_CACHE (100 by default) caps how many it keeps, see Engine.
FEEL evaluation budgets
Caps on what a single FEEL expression can do. They protect against pathological or hostile input, defaults are unreachable for normal expressions.
| Variable | Default | Purpose |
|---|---|---|
FEEL_MAX_DEPTH | 256 | Max recursion depth in evaluation. 0 disables the cap. |
FEEL_MAX_ITERATIONS | 1000000 | Max combined iterations across all for / some / every loops in one evaluation. 0 disables the cap. |
FEEL_DEFAULT_TIMEOUT | 500ms | Wall-clock timeout. Enforced via context cancellation. 0 disables the default. |
DMN evaluation
Applies to the evaluate and simulate endpoints and to BPMN business rule tasks.
| Variable | Default | Purpose |
|---|---|---|
ERROR_MODE | strict | FEEL error handling for DMN and BPMN, per DMN 1.5 section 7.3.8. strict stops at the first error and reports where in the expression it happened. lenient turns a FEEL runtime error such as string length(null) into null for that part of the expression and lists it in the result's warnings. A decision that still fails evaluates to null, returns the message in the error field of its own result, and the decisions around it keep evaluating. |
The spec's own default is lenient. QuantumBPM defaults to strict so a failing
dependency cannot quietly become a null that a downstream decision treats as a
real value. Callers can override the mode per request with the errorMode field
on the evaluate endpoints. BPMN always uses the deployment value.
Under lenient a business rule task whose decision fails completes with a null
variable instead of raising an incident, and a script or mapping that hits a FEEL
runtime error stores null and logs a warning. A null that reaches a gateway
condition, a task type, a loop cardinality or a timer still raises an incident,
and the incident message lists the warnings that produced it. Keep the deployment
on strict if you rely on incidents to catch broken logic.
The mode applies to every step the engine runs, also the later steps of process instances that started under the other mode. A change takes effect when the replicas restart.
Process analytics
An analysis run enumerates instances and reads each one's history from the engine's tables in PostgreSQL, so its read rate is database capacity the live engine does not get. The ceiling is yours to choose. See Analytics for the feature itself.
| Variable | Default | Purpose |
|---|---|---|
ANALYTICS_READ_RATE | 500 | Instances per second one run may read. 0 turns the feature off: the Analytics section is absent from the SPA and the API refuses to create a run. |
ANALYTICS_CONCURRENCY | 16 | Instances fetched in parallel within one run. Past about 32 only latency grows. |
ANALYTICS_MAX_CONCURRENT_RUNS | 3 | Runs executing at once per replica. Each one holds its own read rate, so this multiplies cluster load. |
ANALYTICS_RETENTION_DAYS | 30 | Days a finished run is kept before the retention pass drops it. A run is a few kilobytes of counters. |
DMN simulation
A simulation replays a model's recorded executions through a changed copy within one request, so its timeout is CPU time one request may spend. See Simulation for the feature itself.
| Variable | Default | Purpose |
|---|---|---|
DMN_SIMULATION_TIMEOUT | 5s | Time one simulation may replay for. A simulation that reaches it returns the most recent executions it covered. 0 turns the feature off: the Simulation entry is absent from the SPA and the API refuses to run one. |
Data retention
The engine deletes ended instances once they are old enough. A root instance that ended longer ago than its max age is deleted with its call-activity children and with everything they own: history, user tasks, incidents and decision evaluations. Its jobs went when it ended, and its history keeps what they held. A decision evaluation no instance owns, one made through the evaluate API, is deleted once it is as old. A running instance is never deleted, however old it is.
engine:
retention:
maxAge: 2160h
draftMaxAge: 168h
| Variable | Default | Purpose |
|---|---|---|
ENGINE_RETENTION_MAX_AGE | 2160h (90 days) | How long ended instances and standalone decision evaluations are kept. 0s keeps them. |
ENGINE_RETENTION_DRAFT_MAX_AGE | 168h (7 days) | How long test runs started from the modeler are kept, in every project, and how long the draft document they ran is kept after its last test run started. A draft stays while any instance runs on it. 0s keeps them. |
Durations use Go's units (h, m, s), so 90 days is 2160h. Set 0s as an environment variable, see Configuration file.
A project can keep its instances for a different time. Set retention.maxAge on its entry in the provisioning file. It replaces ENGINE_RETENTION_MAX_AGE for that project, and its test runs still go after ENGINE_RETENTION_DRAFT_MAX_AGE. The file is read on every start, so a change applies after a restart:
projects:
- id: "10000000-0000-0000-0000-000000000001"
name: Payments
retention:
maxAge: 8760h # one year
- id: "10000000-0000-0000-0000-000000000002"
name: Audit
retention:
maxAge: 0s # keep every ended instance
A project removed from the provisioning file keeps its data until the global max age deletes it.
How retention runs
Every replica runs a retention pass once a minute over the partitions it owns, deleting in batches of short transactions. The pass splits those partitions across as many goroutines as the replica has step workers, so it deletes in parallel. The age is measured when the pass runs, so a changed max age also applies to instances that ended before the change. A call-activity child can run on another partition: the root's partition sends it a purge through the outbox, and the child's partition deletes it the same way, along with its own children. The replica that owns partition 0 also deletes the draft documents that no instance names any more. bpmn_engine_retention_purged_total and bpmn_engine_retention_duration_seconds show the work (see Operations).
Space that deletes free is reused by later inserts rather than returned to the operating system, so the engine tables level off at about one max age of data. Shrinking the files needs VACUUM FULL or pg_repack.
Whether retention is set or not, every replica also packs the history of ended instances once a minute. An instance's history entries move from one row each into arrays of up to 500 entries, which Postgres compresses. The history reads the same before and after, and an ended instance takes about a quarter of the space it did. bpmn_engine_history_packed_total counts the packed instances.
Observability
| Variable | Default | Purpose |
|---|---|---|
LOG_LEVEL | info | debug, info, warn or error. Environment only. |
LOG_FORMAT | text | text or json log lines on stdout. Environment only. |
ENABLE_OTEL | false | Master switch for the telemetry subsystem. Enables Prometheus metrics export on REST_METRICS_PORT. See Operations → Observability for what's actually exported. |
OTLP_ENDPOINT | empty | gRPC address of an OTLP collector (host:port, no scheme - e.g. otel-collector:4317). Empty leaves tracing as a no-op: spans are created but dropped, and metrics still export. Requires ENABLE_OTEL=true. |
OTLP_INSECURE | true | Send plaintext gRPC to the collector. OTLP_INSECURE=false sends TLS. |
OTLP_SAMPLE_RATIO | 1.0 | Head sampling ratio, applied as ParentBased(TraceIDRatioBased). 1.0 exports every trace, 0.1 ≈ 10%. |
Advanced tuning
The engine's step workers, poll interval, job retry delay and worker lock bounds are on the Engine page.
If you find yourself wanting to tune these, talk to support@quantumbpm.com - we'd rather understand the workload and give you a recipe than have you guess.