Start with the response status and structured error reason, then correlate it with Ledger membership, storage, and telemetry. Several different protections return 503; they do not all have the same retry or recovery action.
Preserve evidence first#
Before restarting, scaling, compacting, removing a member, or changing configuration, record:
- the start time, affected operation, ledger, endpoint, and request or trace identifier;
- the Stack, Operator, Ledger server, and client versions;
- the HTTP status or gRPC code, the structured reason, and the
Retry-Aftervalue when the response is a503; - whether reads, writes, or both are affected;
- the current leader, voters and learners, committed position, and applied positions;
- recent rollout, maintenance, index, backup, restore, or event-sink activity;
- member restarts, volume events, and time-synchronization state.
Run non-destructive checks first:
cluster disk-usage inspects the member reached by the active profile. Repeat it against each member endpoint when the affected node is not known.
Do not use ledgerctl cluster remove-node --force, do not restart a node with the server's --unsafe-skip-config-validation, and do not hand-edit persistent data or delete a persistent volume as a diagnostic step. These actions change the evidence and can make recovery harder. The storage-schema-version check cannot be bypassed, not even with --unsafe-skip-config-validation, so that flag will not clear a schema failure.
Route the symptom#
| Symptom | Confirm | Likely condition | Next action |
|---|---|---|---|
HTTP 503 with NO_LEADER and Retry-After: 1 | ledgerctl cluster status shows no leader | Election in progress, missing voter majority, or broken peer connectivity | Clients may retry after the advertised delay for a brief election. Restore quorum or peer connectivity when it persists. |
Pods are ready, but writes return 429 and WRITES_BLOCKED_DISK_FULL | Disk usage on each member; WAL/data high-water settings | At least one protected volume crossed its block mark | Stop non-essential writes, expand the affected volume through the supported platform path, and wait until use falls below the resume mark. |
Pods are ready, but writes return 503 and WRITES_BLOCKED_CLOCK_SKEW | Node clock offset and time-service health | A peer exceeds the configured clock-skew threshold (--health-clock-skew-threshold, 500 ms by default) | Restore time synchronization across members. Do not disable the gate before identifying the clock source. |
Writes return 503 and MAINTENANCE_MODE | Cluster status reports maintenance enabled | A planned or failed maintenance window still owns the write boundary | Contact the maintenance owner and follow Use Maintenance Mode. Do not retry until the boundary is intentionally removed. |
| A follower endpoint fails writes while direct leader requests work | Request path through every exposed endpoint; internal TLS and cluster trust | The follower cannot forward authorized requests to the leader | Follow Secure Cluster Traffic with TLS and verify certificates, names, trust, and cluster identity on every member. |
401 from all endpoints | Token signature, issuer, audience, expiry, and active profile | Authentication failed | Refresh or correct the credential using Authenticate and Authorize Clients. An invalid token must not fall back to anonymous access. |
403 for one operation | Caller scopes and ledger target | The authenticated caller lacks permission | Compare the required scope with the assigned role; do not broaden access until the denied action is understood. |
| TLS handshake or certificate-name failure | CA chain, certificate validity, SAN, endpoint name, and client profile | Client or inter-node trust does not match the endpoint | Correct the trust or name through the TLS runbook; do not use insecure transport as the production fix. |
| Writes are slow and queue-full counters increase | Apply, WAL, peer latency, Pebble stall, CPU and disk IOPS | Consensus or storage cannot sustain the incoming rate | Reduce load, preserve quorum, then follow Plan Capacity and Tune Performance. |
| Member remains a learner or falls behind | Cluster status from leader and affected node; restart, disk, network, memory | Catch-up cannot complete or the member keeps restarting | Stop further lifecycle changes and follow Plan Topology and Manage Cluster Lifecycle. |
Query reports INDEX_BUILDING or required index is not ready | Index status on every serving member | Backfill has not completed | Keep dependent traffic disabled and follow Create and Manage Indexes. |
Current read reports READ_INDEX_NOT_CAUGHT_UP | Requested minimum sequence or checkpoint versus member state | The local read index has not reached the requested position | Retry on an appropriate member after catch-up or choose the documented consistency path; see Choose Read Consistency and Use Checkpoints. |
| Filter returns an index error or unexpectedly empty result | Target, field, typed schema, filter, index, cursor and checkpoint | Query contract or view does not match the request | Validate the filter and index rather than falling back to an unbounded scan. |
| Transactions commit but downstream events stop | Sink cursor, last error, destination and consumer deduplication | Asynchronous delivery is retrying independently of Ledger commits | Follow Consume, Monitor, and Recover Events; do not replay without a deduplication plan. |
| Backup or restore stalls or fails validation | Job status, manifest, segment chain, object access, target cleanliness | Artifact, credential, concurrency, compatibility, or target-state problem | Keep the source cluster unchanged and follow the backup or restore runbook. Do not finalize an invalid restore. |
Diagnose availability failures#
No leader#
A brief election can return 503, NO_LEADER, and Retry-After: 1. Any request can hit it, including a linearizable read. Retry after the advertised delay: a mutation must be reissued byte-identical under its original idempotency key, while a read carries no key and can simply be repeated. Reusing a key with different content is rejected, not silently accepted — see the IDEMPOTENCY_KEY_CONFLICT row in Retry and rollback rules. When the condition lasts beyond the normal election window:
- identify which voters are reachable;
- confirm that a majority of the configured voter set is running;
- compare peer connectivity and internal TLS from each voter;
- inspect disk, memory, and restart events on missing members;
- stop concurrent disruption or rollout;
- recover existing members before considering membership changes.
Do not bootstrap a replacement cluster or force-remove a member while the previous voter set can recover. Escalate a quorum-loss decision with the current membership and volume state.
Ready but not writable#
If a disk or clock-skew write gate is active, readiness still reports healthy. Read the structured reason to tell the gates apart:
WRITES_BLOCKED_DISK_FULLneeds volume headroom below the low-water resume mark;WRITES_BLOCKED_CLOCK_SKEWneeds clocks brought within the configured threshold;MAINTENANCE_MODEneeds the maintenance owner to release the boundary.
Every 503 carries Retry-After: 1 — NO_LEADER, WRITES_BLOCKED_CLOCK_SKEW, MAINTENANCE_MODE, INDEX_BUILDING and READ_INDEX_NOT_CAUGHT_UP among them. That value is a fixed default applied to the whole class, not an estimate of how long the condition will last, so read the header as "this response is retryable in principle" and let the structured reason set the actual retry policy. NO_LEADER clears within an election and does suit a one-second retry; MAINTENANCE_MODE does not, and a client that honors the header literally will retry every second for the length of the window. The disk-full 429 carries no header at all, so a client must pace those retries itself.
Do not repeatedly restart ready members. The write gate is cluster state or a health decision, not a liveness failure.
Diagnose latency#
Correlate the same time window in this order:
- request latency and response reasons;
- proposal queue load and full events;
- Raft apply and WAL append duration;
- peer round-trip latency and leadership changes;
- Pebble flush, compaction, and write stalls;
- WAL/data bytes and volume IOPS;
- process memory, garbage collection, CPU throttling, and restarts;
- index builds, backups, and restore work;
- changes in request size, bulk concurrency, postings, or Numscript account fan-out.
Reduce incoming concurrency when the queue or storage cannot drain. Tune only after identifying the limiting resource and capturing a repeatable baseline.
Retry and rollback rules#
| Condition | Client behavior | Operator behavior |
|---|---|---|
Brief NO_LEADER with Retry-After | Retry after the advertised delay. A mutation keeps its original idempotency key and payload; a read has neither and is simply repeated. | Watch election and quorum; intervene if it persists. |
| Maintenance mode | Stop automatic retries or back off until the maintenance owner reopens writes. | Keep the application drain in place and complete or roll back the maintenance task. |
| Disk-full gate | Do not create a retry storm. Preserve the mutation and its idempotency key. | Restore headroom and verify use below the resume mark. |
| Clock-skew gate | Back off; changing request payload does not help. | Restore node time synchronization. |
409 with IDEMPOTENCY_KEY_CONFLICT | The key was reused with different request content. Reissue the original payload unchanged, or use a new key for a genuinely different request. | Compare the retried request body against the recorded first attempt; a conflicting retry is rejected, never applied twice. |
| Auth or validation error | Do not retry unchanged credentials or payload. | Correct the client, policy, or request contract. |
| Index building or read index behind | Retry only after the required view advances, or use an explicitly acceptable consistency mode. | Keep dependent traffic disabled and restore index progress. |
If a deployment or configuration change caused the symptom, stop its rollout and follow that change's rollback procedure. Do not introduce an unrelated tuning change while evidence still points to the original change.
Prepare an escalation bundle#
Include:
- exact UTC time range and user impact;
- Stack, Operator, server, and client versions and image digests;
- sanitized request shape, response status, structured reason, and retry header;
- cluster status from the leader and affected member;
- Operator conditions and Kubernetes events;
- relevant logs and traces with credentials, tokens, signing keys, and database DSNs removed;
- dashboard snapshots for request, leader, queue, WAL, apply, storage, memory, and network signals;
- the last known good change and every action already attempted;
- backup status and persistent-volume state when recovery may be required.
Preserve the original artifacts. An escalation should allow another operator to reconstruct the timeline without repeating a destructive action.