Skip to content

Monitoring

Watching an instance: whether it’s up, what it does, and what goes wrong. With authTokenFile set, /health and /stats need the token like every other route.

Health check

GET /health tells a supervisor or a load balancer whether the server can serve requests.

sudo -u tamarackdb curl --unix-socket /run/tamarackdb/tamarackdb.sock http://localhost/health
{ "status": "ok", "paused": false, "version": "1.2.3" }
  • 200 OK when the server responds and its database can be reached. A paused server still answers 200.
  • 503 when the database can’t be reached.
  • paused is true once a pause is in place.

Counters

GET /stats returns counters since the server started. A rate is the difference between two calls. The format may change from one version to the next.

{
  "startedAt": "2026-10-03T14:00:00.000000Z",
  "lastOptimizeAt": "2026-10-04T03:00:00.000000Z",
  "writes": {
    "committed": 18234,
    "conflicts": { "condition": 12, "projection": 3 },
    "writeQueueFull": 0
  },
  "transactions": {
    "begun": 18301,
    "committed": 18234,
    "abandoned": 40,
    "expired": 2,
    "designErrors": 0,
    "paused": 0,
    "busy": 0,
    "tooMany": 0,
    "largestRead": 2000
  },
  "pause": {
    "state": "normal",
    "since": "2026-10-03T14:00:00.000000Z",
    "openTransactions": 0
  },
  "wal": { "size": 4120032, "checkpoints": 81, "checkpointsBusy": 0 },
  "errors": { "internal": 0, "storageFull": 0 }
}

What to watch:

  • writes.conflicts.condition: two commands decided on the same events at the same time. A steady rate is normal under load.
  • writes.conflicts.projection: often two copies of one projector running at once.
  • writes.writeQueueFull above zero: maxQueuedWrites is too low, or writes are too large (see Configuration).
  • transactions.expired rising: the application begins transactions and forgets them.
  • transactions.designErrors or transactions.busy above zero: the client library has a bug.
  • transactions.tooMany above zero: maxOpenTx is too low, or the application begins transactions and never ends them (see expired).
  • transactions.largestRead, the most events one read of a transaction returned, getting close to maxEventsPerTxRead: a decision reads more events as the log grows. Past the setting, its command fails. The log has a warning line for each read over half of it.
  • pause.state stuck at pauseRequested: transactions are still open (openTransactions), or whoever asked for the pause stopped calling POST /pause.
  • wal.size well above 64 MiB, or wal.checkpointsBusy rising: reads take too long, and keep the WAL from being emptied. defaultEventsPerPage or maxEventsPerPage is too high. The WAL file is emptied each time it goes past 64 MiB; the write that took it there waits for it, usually under a second.
  • lastOptimizeAt more than a day old: the daily POST /optimize doesn’t run (see Maintenance).
  • errors.internal above zero: a failure on the server. The log has the matching error lines.
  • errors.storageFull above zero: writes were refused because the disk is full, with 507 StorageFull. Nothing was written. Free space: the next write goes through, with no restart.

Logs

The server logs one line per request to stdout:

tamarackdb-server: [WARNING] POST /projections 503 27B 0.07ms
  • A line holds the level, the method, the path, the status, the response size, and the time taken. Never a body.
  • logLevel sets the lowest level written. The default, info, shows no success: only clients’ mistakes, administration actions, and problems. Use debug to see every request.
  • debug: a success, or an expected refusal such as a conflict.
  • info: a client’s mistake, such as a malformed request or a bad token, or a pause, a resume, an optimize, or a bulk delete.
  • warning: the write queue is full, maxOpenTx transactions are open, or a read of a transaction returned more than half of maxEventsPerTxRead events.
  • error: a failure on the server, or a write refused because the disk is full.