Skip to content

Root configuration properties in Cratis Chronicle

These properties live at the root of chronicle.json.

{
"port": 35000,
"bindTimeout": "00:00:30",
"healthCheckEndpoint": "/health",
"maxReceiveMessageSize": 104857600,
"startup": {
"busySiloWaitLimit": "02:00:00"
},
"shutdown": {
"drainTimeout": "00:00:08"
}
}
Property Type Default Description
port number 35000 By default, gRPC (HTTP/2) and Workbench/API/OAuth/health (HTTP/1.1) over TLS; HTTP/2-only h2c when tls.enabled=false
strictEventTypeSchemaEventStores string array [] Event stores that reject in-place additive schema evolution. Matching is case-sensitive. Client-owned event types can evolve additively in every other store.
additiveEventTypeSchemaEvolutionEventStores string array [] Deprecated and ignored. Retained for configuration compatibility; use strictEventTypeSchemaEventStores to opt out instead.
bindTimeout time span 00:00:30 How long to retry a port bind that fails with EADDRINUSE
healthCheckEndpoint string /health Health check endpoint path
maxReceiveMessageSize number 104857600 The largest gRPC message in bytes the kernel accepts from a client, 100 MB by default. Remove the limit with null
maxSendMessageSize number unlimited The largest gRPC message in bytes the kernel sends to a client
startup.busySiloWaitLimit time span 02:00:00 How long a startup step waits for a silo that is up but not answering before the server stops
shutdown.drainTimeout time span 00:00:08 Shared budget for joining local observer work and draining appended-event queues at shutdown

Client-owned event types accept compatible in-place additions in every event store by default. To keep strict generation validation for one event store, configure the following at the root of chronicle.json on every kernel silo:

{
"strictEventTypeSchemaEventStores": ["Orders"]
}

The environment-variable equivalent is Cratis__Chronicle__StrictEventTypeSchemaEventStores__0=Orders. Add further entries using __1, __2, and so on. Event store names match exactly, including case. An empty array (the default) opts no stores out. Clients cannot override this policy through registration payloads, and kernel-owned system event types are always excluded from in-place evolution. Changing the configuration requires the normal server configuration rollout; applying an allowed schema addition afterward does not require a restart.

The former additiveEventTypeSchemaEvolutionEventStores option is deprecated and ignored. Existing configurations still bind, but that list no longer restricts evolution to the named stores and cannot override the strict list. A populated legacy list produces a startup warning. When upgrading, add any stores that must retain strict validation to strictEventTypeSchemaEventStores.

See Evolving event schemas for the compatibility rules, audit trail, and historical-data limitations.

bindTimeout defaults to 30 seconds. Chronicle retries any port bind that fails with EADDRINUSE until this timeout expires, including one blocked by a persistent listener; it delays startup failure rather than resolving a persistent conflict. Set it to "00:00:00" to disable retries and fail on the first bind attempt. The environment-variable form is Cratis__Chronicle__BindTimeout=00:00:30.

Chronicle exposes the health check endpoint on the main port (35000). You can customize the path if your environment requires a different route.

To expose the health endpoint on a dedicated port — with TLS optionally disabled for orchestrator and load-balancer probes — see Health Endpoint.

Every startup step calls a grain. When a call times out against this silo itself, or against a sibling the cluster reports as active, that silo is up and most likely busy catching up on a backlog. Restarting would only restart the same backlog, so the step does not count the timeout as a failed attempt. It waits instead, with a backoff capped at one minute. The silo stays running and not ready while it waits, and every wait is logged. The log is a warning at first and an error after ten waits.

A grain that never answers, such as a deadlock or storage that hangs, times out the same way, so the wait is bounded. startup.busySiloWaitLimit sets how long one step waits from its first such timeout, two hours by default. When it has passed, the server logs a critical message and stops, as it does for any step that keeps failing. Raise the limit if your server needs longer to drain its backlog. "00:00:00" turns the wait off, so the first busy timeout stops the server. The environment-variable form is Cratis__Chronicle__Startup__BusySiloWaitLimit=02:00:00.

Timeouts against a silo the cluster does not report as active still count as attempts. A step stops the server once its attempts are exhausted.

shutdown.drainTimeout gives all local observers and appended-event queues one shared shutdown deadline, rather than a separate timeout per observer. It defaults to eight seconds. shutdown.hostShutdownReserve adds five seconds by default for Orleans silo stop, reminders, and hosted services after draining. The server derives its host shutdown timeout from their sum: thirteen seconds by default. Chronicle caps the effective drain budget at the host shutdown timeout minus the configured reserve, and logs it at startup.

Set Cratis__Chronicle__Shutdown__DrainTimeout=00:00:05 to use a five-second drain budget, or Cratis__Chronicle__Shutdown__HostShutdownReserve=00:00:07 to reserve seven seconds after draining. A zero drain timeout skips waiting. The host shutdown reserve must be greater than zero. Leave your orchestrator enough termination grace for the total host shutdown timeout.

Shutdown refuses new observer service calls, joins admitted catch-up and replay work, and flushes local bulk windows without promoting an unfinished replay. If the deadline expires, Chronicle cancels MongoDB bulk writes and logs the affected observer, partitions, and event sequence numbers when available. Cancellation means the write outcome is unknown, not that MongoDB rolled it back. Unconfirmed writes do not advance handled positions; failed partitions are recorded best-effort only while time remains.

The default host shutdown timeout is thirteen seconds. A stop that takes all of it counts as timed out, even when no service reports a failure, because a timed-out service usually just returns late. The process exit code tells your orchestrator how the server stopped:

Exit code When Log entry
0 The stop completed within the host shutdown timeout, or a stop was requested while the server was still starting. Information: Chronicle Server stopped. Exiting with code 0
1 The server requested it, for example after losing its single-writer lease, and then stopped. Warning: Chronicle Server stopped. Exiting with code 1, which the server requested
4 The command-line arguments, the connection file or the configuration cannot be read, so the server does not start. The reason, written to standard error
70 The server failed to start, the stop timed out, a service failed while stopping, or releasing services failed after the stop. Critical, naming the reason; a timeout also logs how long the stop took

A code the server requested takes precedence over 70: a server that lost its single-writer lease exits with code 1 even when its stop then times out or fails. The Critical entry still names the failure.

The kernel tracks which clients are connected. These settings live under connectedClients and servers and rarely need changing.

Property Type Default Description
connectedClients.reviseIntervalSeconds number 2 Seconds between passes that prune stale clients and expire connection reservations. Also how often a reactor or reducer subscription that is not yet confirmed intact is checked, see Keeping client subscriptions
connectedClients.subscriptionCheckIntervalSeconds number 60 Longest wait between checks of a reactor or reducer subscription that is known to be intact. Each wait is drawn between three quarters of this value and all of it. The safety net for a subscription lost without a silo leaving. Values below reviseIntervalSeconds are raised to it
connectedClients.subscriptionSettleSeconds number 30 Seconds after a silo starts shutting down, and again after it is declared dead, during which every reactor and reducer subscription is checked every reviseIntervalSeconds
connectedClients.reservationTtlSeconds number 30 Seconds a connection reservation is kept. A reservation holds a slot for a client that is still connecting
connectedClients.staleThresholdSeconds number 5 Seconds a client can go unseen before it is considered disconnected. Raise it only if healthy clients are dropped on a slow network
connectedClients.observeIntervalSeconds number 1 Seconds between observations of the connected clients for observers
connectedClients.keepAliveIntervalSeconds number 1 Seconds between keep-alive messages the kernel sends to a connected client
connectedClients.graceSeconds number 2 Seconds a connect or a keep-alive waits for the kernel’s own bookkeeping, which is done by grains, before it answers anyway. The bookkeeping and the cluster-wide check that no other caller holds the connection carry on in the background; a refusal that arrives after the connection was served ends the stream. A client is never left waiting for a saturated grain
connectedClients.keeperMode string SiloLocal How the open stream of a client confirms that its reactor and reducer subscriptions are intact. SiloLocal confirms the subscription of a dormant observer whose record names this client on this silo without asking it, so the observer is not woken and the client’s grains are not kept in memory for it; every other observer is asked. Legacy calls the client’s grains on every check. See Keeping client subscriptions
servers.observeIntervalSeconds number 5 Seconds between observations of server instances for the live Workbench view

The subscription of a connected reactor or reducer exists only in the memory of the kernel’s grain activations. A silo that leaves the cluster takes the activations it hosted with it, and the remaining silos deactivate the activations whose directory entries it owned. The client stays connected and never registers again, so the kernel restores the subscription from the open observation stream.

Each stream checks its subscription with two grain calls, or, with the default keeperMode, for an observer that is dormant and recorded this client, without calling an observer or a client grain (the records of a namespace are read once and shared by every stream). Every other observer is checked with the grain calls. How often depends on what the kernel knows:

  • A new subscription, one that was just restored, and one whose check failed are checked every reviseIntervalSeconds, until a check finds the subscription intact. So is a client the observer only holds as a superseded registration during a client rollout, and an inactive reducer whose registration is still held back for a webhook.
  • When a silo starts shutting down, and again when it is declared dead, every stream on the remaining silos checks within one reviseIntervalSeconds, spread over that interval, and then every reviseIntervalSeconds for subscriptionSettleSeconds. During a rolling deployment the kernel is therefore back at one check per subscription every reviseIntervalSeconds for as long as silos keep leaving.
  • Otherwise an intact subscription is checked after a wait drawn between three quarters of subscriptionCheckIntervalSeconds and all of it, so subscriptions registered together are not checked together.

How long a lost subscription goes without delivery depends on how it was lost:

  • A silo shuts down gracefully. Its activations are deactivated while it shuts down, inside the settle window that starts when it begins shutting down. A subscription lost that way is restored within about two reviseIntervalSeconds of being lost, provided the shutdown takes no longer than subscriptionSettleSeconds.
  • A silo crashes. Nothing is signalled until Orleans declares the silo dead, which takes its failure detection: missed probes and votes from the other silos, usually far longer than the restore itself. From that moment the subscription is restored within about two reviseIntervalSeconds. The same holds for activations the remaining silos deactivate because the dead silo owned their directory entries, if that happens within subscriptionSettleSeconds.
  • Any other way - an observer deactivated on a healthy cluster, a client rollout whose handover failed in a way the checks above do not see, a membership the kernel could not follow - the subscription is restored by the safety net, within subscriptionCheckIntervalSeconds plus the duration of one check. A check normally takes milliseconds, but one that reaches an unreachable observer can take up to clustering.responseTimeout before it fails and is retried every reviseIntervalSeconds.

With the defaults that is about 4 seconds after the loss or after death is declared, and about 62 seconds otherwise. Setting subscriptionCheckIntervalSeconds to the value of reviseIntervalSeconds restores the earlier behavior of checking every subscription every reviseIntervalSeconds, at the cost of one call per subscription every interval.

These bounds cover the observer’s subscription only. Delivery to a subscribed observer through the appended-events queue is watched separately by the observer watchdog, every observers.watchdogInterval seconds.

The settle window relies on how the kernel runs Orleans: the classic grain directory, no activation repartitioning or rebalancing, and no memory-based activation shedding. With any of those enabled, a silo joining or activations moving would lose subscriptions that only the safety net restores.

Environment variables use the Cratis__Chronicle__ConnectedClients__ and Cratis__Chronicle__Servers__ prefixes. See Azure container hosting for why keep-alive and stale threshold matter for scale-to-zero platforms.

The overload section sets when a silo reports itself as overloaded: enabled (true), maxOldestPendingCallAgeSeconds (15), maxPendingCalls (2000), maxRunningCalls (2000) and recoverySeconds (30). Environment variables use the Cratis__Chronicle__Overload__ prefix.

maxReceiveMessageSize defaults to the 100 MB the Chronicle clients allow themselves to send, so a large event, or a client-side reducer whose read model has grown, is not refused by the kernel. Raise it together with the client’s MaxSendMessageSize if you need more. See gRPC Message Size.