Skip to content

Incident Triage & Fail-Stop Playbook (Signal → 60s Diagnosis → Mitigation → Sign-Off)

This runbook equips on-call DBAs, SREs, and platform engineers with deterministic Signal → 60-Second Diagnosis → Immediate Mitigation → Sign-Off procedures for the five critical production incident classes on Engula 2.3.0 (metric definitions are in ENGULA INFO, Prometheus & Grafana).

Incident Class 60-Second Diagnostic Commands Immediate Mitigation Recovery Sign-Off Criteria
1. Approaching maxmemory or Transient Spike INFO memory, ENGULA INFO evict, SLOWLOG GET 20 Verify enable-debug-command no so predictive eviction is active; split 100k-key EVAL / MULTI batches; raise maxmemory or add shards if needed Effective fill ratio < 0.85, engula_mem_usage_pressure_ratio receding, zero unexpected OOM errors
2. WAN Link Flaps & Fullsync Storms INFO replication, INFO stats, CONFIG GET repl-backlog-size Increase repl-backlog-size and client-output-buffer-limit replica online; separate homogeneous vs. mixed-engine replica sync batches master_link_status:up, zero sustained lag, sync_partial_ok handling blips
3. BGSAVE Memory False Alarm or Disk Full INFO persistence, /proc/<pid>/smaps_rollup, df -h Check rdb_last_cow_size and kernel Pss to rule out parent+child VmRSS double-counting; free disk space and toggle stop-writes-on-bgsave-error briefly if blocked Fresh BGSAVE finishes in seconds with rdb_last_bgsave_status:ok
4. Foreground P99 Tail-Latency Spike ENGULA INFO cpu, ENGULA INFO pipeline, ENGULA INFO coro, SLOWLOG GET 20 Confirm avx2/pclmul or neon SIMD is active; verify io-threads 4; replace hot-path full HGETALL scans with batched HMGET or rebalance slots rate(engula_zip_inline_urgent_total[5m]) == 0 and client P99 back at baseline
5. Fail-Stop Marker Shutdown Sentinel / Cluster state, server log, ENGULA INFO health Protect traffic first: confirm healthy replica promoted in ~5–6s; isolate node: inspect host ECC/NVMe errors, wipe stale local dir, resync cleanly from healthy primary Rebuilt replica online with master_link_status:up and engula_rdb_last_load_dropped == 0

Scenario 1: Approaching maxmemory & Giant EVAL / MULTI Spikes

60-Second Diagnosis

1redis-cli -h <host> -p <port> INFO memory | grep -E 'used_memory:|used_memory_rss:|mem_not_counted_for_evict:|maxmemory:'
2redis-cli -h <host> -p <port> ENGULA INFO evict
3redis-cli -h <host> -p <port> CONFIG GET enable-debug-command
  1. Compute True Eviction Watermark: Because used_memory includes pre-allocated writable block headroom and uncompacted deletion holes, always evaluate (used_memory - mem_not_counted_for_evict) / maxmemory alongside engula_mem_usage_pressure_ratio.
  2. Verify Predictive Eviction Is Enabled: Under non-noeviction policies, the server paces eviction smoothly ahead of the wall (engula-evict-forecast-lead-ms, default 10000 ms). If enable-debug-command is set to yes or local, predictive eviction is disabled — immediately run CONFIG SET enable-debug-command no.

Mitigation (Ruling Out Giant EVAL / MULTI Argument Retention)

If used_memory_rss spikes by hundreds of MBs for a few seconds and immediately drops back down, inspect SLOWLOG GET 20 for single Lua scripts or MULTI/EXEC blocks writing tens of thousands of keys at once (when replicas, repl-backlog, or AOF are active, uncompressed command arguments must be retained until script completion).

  • Fix: Temporarily raise maxmemory if host DRAM allows, and have the application team chunk bulk script writes into 1,000–5,000-key batches or standard client pipelines.

60-Second Diagnosis

1redis-cli -h <primary> -p <port> INFO replication
2redis-cli -h <primary> -p <port> INFO stats | grep -E 'sync_full|sync_partial_ok|sync_partial_err'
3redis-cli -h <primary> -p <port> CONFIG GET "client-output-buffer-limit"

Immediate Mitigation

  1. Keep WAN Flaps Inside PSYNC2 Backlog: If short WAN blips increment sync_partial_err and sync_full, expand the backlog dynamically via CONFIG SET repl-backlog-size 512mb (1gb on write-intensive shards) so reconnects resume from exact byte offsets (+CONTINUE).
  2. Prevent Output-Buffer Disconnect Loops: Ensure client-output-buffer-limit replica is at least 1gb 512mb 60, paired with dual-channel-replication-enabled yes and repl-diskless-load swapdb.
  3. Separate Homogeneous & Legacy Sync Batches: If a primary serves both Engula 2.3.0 replicas and legacy Redis 7.2 replicas simultaneously, a combined sync batch falls back to traditional RDB encoding. Sync homogeneous Engula replicas first (1.83s native stream) before attaching mixed-engine replicas.

Scenario 3: BGSAVE Memory False Alarms (VmRSS vs. Pss) & Full Disks

60-Second Diagnosis

After fork(), parent and child share physical pages; naive host scripts summing parent VmRSS + child VmRSS double-count shared pages and falsely page on "2× memory spikes." Check true CoW growth directly:

1# 1. Read exact kernel-tracked CoW bytes (live, peak, and last completed BGSAVE)
2redis-cli -h <host> -p <port> INFO persistence | grep -E 'rdb_bgsave_in_progress|current_cow_size|current_cow_peak|rdb_last_cow_size|rdb_last_bgsave_time_sec'
3
4# 2. Read proportional physical memory (Pss in KB) on the Linux host
5grep -H '^Pss:' /proc/$(pidof engula-server)/smaps_rollup

Immediate Mitigation

  • Transient recyclable_bytes Rise During BGSAVE Is Expected: While a BGSAVE or AOF child is active, new defragmentation and recompression tasks pause automatically to avoid dirtying shared 4 KB pages, converging within seconds after child exit.
  • Disk Full Blocking Writes (stop-writes-on-bgsave-error yes): Reclaim disk space by pruning rotated logs or stale local archives; if foreground writes must resume immediately while freeing disk space, run CONFIG SET stop-writes-on-bgsave-error no, verify a clean BGSAVE (rdb_last_bgsave_status:ok), and restore stop-writes-on-bgsave-error yes.

Scenario 4: Foreground P99 Tail-Latency Spikes (4-Step Triage)

1redis-cli -h <host> -p <port> ENGULA INFO cpu
2redis-cli -h <host> -p <port> ENGULA INFO pipeline | grep -E 'queue_length|inline_urgent|inline_main_thread|tasks_inflight'
3redis-cli -h <host> -p <port> ENGULA INFO coro
4redis-cli -h <host> -p <port> SLOWLOG GET 20
  1. Check Hardware SIMD Features (ENGULA INFO cpu): Verify engula_cpu_simd_features includes avx2 / pclmul (x86_64) or neon (ARM64). If live VM migration landed on a masked hypervisor CPU profile, fail over off that host.
  2. Check Urgent Inline Compression (engula_zip_inline_urgent_total): If rate(engula_zip_inline_urgent_total[5m]) > 0 on a multi-threaded node, verify CONFIG GET io-threads is 4 (not accidentally 1) and check for multi-megabyte value bursts.
  3. Check Full-Collection Scans (SLOWLOG): Replace hot-path HGETALL, SMEMBERS, HSCAN, or partial SETRANGE mutations on large compressed collections with targeted HMGET batches or whole-key writes.
  4. Check Single-Core Saturation: If main-thread CPU exceeds 65%–70% sustained, rebalance slots via Mixed-Cluster Live Slot Migration or offload reads to replicas; on dedicated tiny-string instances, disable compression for new writes via CONFIG SET engula-disable-string yes.

Scenario 5: Fail-Stop Marker Shutdown, Replica Promotion & Clean Rebuild

Against multi-bit DRAM flips or silent storage corruption, Engula 2.3.0 enforces Fail-Stop Isolation + HA Replica Promotion: instead of attempting unsafe in-place memory patching at runtime, the node logs diagnostics, writes engula-corruption.marker, and halts immediately so Sentinel or Cluster promotes a clean replica.

  1. Confirm Traffic Cutover to Healthy Primary (T + 10s): Verify Sentinel or Cluster promoted a healthy replica within ~5–6s.
  2. Quarantine the Halted Node: Keep replica-priority 0 on the affected instance so it cannot reclaim primary leadership before inspection.
  3. Inspect Startup Validation Health & Offline Snapshot Integrity:
    1redis-cli -h <isolated-node> -p <port> ENGULA INFO health
    2valkey-check-rdb /var/lib/engula/dump.rdb
    • If corruption exceeded engula-rdb-validate-max-drop-ratio (default 100 ppm, 128-record floor) and exited with code 1, dump.rdb and the marker remain intact on disk for forensics.
  4. Audit Host ECC Memory & NVMe Health: Inspect dmesg -T, rasdaemon / mcelog, and nvme smart-log; decommission hosts with uncorrectable hardware faults.
  5. Rebuild Cleanly as a Fresh Replica: Wipe the quarantined node's stale data directory and marker, run REPLICAOF <healthy-primary> <port> to pull a clean whole-block snapshot from the live primary, verify master_link_status:up and engula_rdb_last_load_dropped:0, and restore normal replica-priority.