DBRaven

Post-Mortem Intelligence Framework

Select a failure mode to generate a structured, architecture-grounded post-mortem framework. Each framework covers incident classification, contributing factors, propagation chain, mitigation gaps, and a tiered remediation plan, all traceable to the knowledge base.

caching

capacity

Batch Job Resource Starvation

partial

When long-running batch jobs consume all available database connections or CPU capacity, they starve concurrent OLTP requests of the resources needed for interactive response times. Batch queries hold connections for minutes while scanning large datasets, causing OLTP p99 latency to spike into the seconds as requests queue behind full-table scans in the shared connection pool.

Checkpoint Amplification

partial

PostgreSQL's checkpoint process periodically flushes all dirty shared buffer pages to disk, causing a predictable I/O storm at each checkpoint interval that spikes disk utilisation and elevates write transaction latency for the duration of the flush.

Connection Leak

critical

Database or network connections are acquired from the pool but never returned, causing the pool to drain slowly over hours or days until exhausted, manifesting as a gradual degradation rather than a sudden spike.

Connection Pool Exhaustion

critical

All database connections in the pool are in use; new requests queue and then time out, causing cascading latency and errors across all dependent services.

Connection Pool Exhaustion Under Downstream Latency

critical

When a downstream dependency (database, external API, microservice) experiences increased latency, in-flight requests hold their thread or connection longer, causing the connection pool to exhaust even though request rate has not increased : a latency-to-throughput coupling that amplifies a downstream slowdown into an application-wide outage.

Connection Pool Fragmentation Under Mixed Workloads

partial

When a shared connection pool is simultaneously used by fast OLTP queries (sub-10ms) and slow analytical or batch queries (seconds to minutes), long-running queries hold connections for their full execution duration, leaving insufficient available connections for the high-rate OLTP traffic. OLTP requests queue at the pool acquisition step, driving p99 latency into the seconds even when the database itself is not overloaded and has capacity to execute additional fast queries.

Database Connection Churn

partial

When an application repeatedly opens and closes database connections at high rate: due to missing connection pooling, misconfigured pool recycling, or serverless function architecture: the database server is overwhelmed with connection establishment overhead. PostgreSQL forks a new backend process per connection (10–50ms overhead each), and at high connection rates the server hits its max_connections limit and rejects new connections with "too many clients already", even though the database itself has idle capacity for query execution.

Disk I/O Saturation

critical

The storage device reaches its IOPS or throughput ceiling, causing all disk- dependent database operations to queue behind I/O requests, driving latency from sub-millisecond to hundreds of milliseconds and degrading all database operations simultaneously.

Fan-Out Write Amplification

partial

When a single logical write event triggers cascading writes to multiple downstream stores: follower timelines, search indexes, analytics pipelines, notification queues: the downstream write volume can exceed the upstream write volume by orders of magnitude. A celebrity user with 10 million followers posting a single item triggers 10 million individual timeline write operations. Executed synchronously, this blocks the write response for seconds to minutes. Executed asynchronously, it fills downstream queues and can saturate storage or write throughput on downstream systems for hours.

Hot Partition

critical

One partition (a database shard, a Kafka topic partition, a Redis hash slot) receives traffic so far above its peers that it saturates while the others sit idle. Aggregate capacity looks healthy, but the hot partition throttles or lags, and everything routed to it degrades. The cause is skew in how keys map to partitions, and the fix depends on whether the skew is spread across many keys or concentrated in one.

Leader Write Bottleneck in Replicated Systems

partial

In single-leader replication systems, all writes must pass through the leader node. Adding read replicas scales read throughput horizontally but has no effect on write throughput, which remains bounded by the leader's single-node I/O, CPU, and WAL/binlog capacity. As write-heavy workloads grow, the leader becomes the inescapable throughput ceiling for the entire cluster, and no amount of horizontal scaling of replicas can resolve it.

Lock Contention

critical

Concurrent writers to the same rows serialize behind each other's row locks, so latency is set not by the work a transaction does but by how long it waits for the writers ahead of it. On a hot row the queue depth, and therefore the tail latency, grows with concurrency while throughput flattens. Blocked writers hold connections open, so a single contended row can drain the connection pool as a secondary failure.

Memory Pressure and OOM Kill

critical

When total memory demand from a process or the entire host exceeds available physical RAM plus swap, the Linux OOM killer terminates one or more processes to reclaim memory, causing immediate connection loss, data corruption risk if in-flight writes are lost, and process restart overhead.

N+1 Query Problem

partial

Application code issues one query to fetch N parent records, then issues N individual queries to fetch each child record, executing N+1 round trips to the database instead of 1–2, multiplying database load proportionally to the result set size.

Noisy Neighbor

degraded

A co-located workload consumes shared resources (CPU, I/O, memory, network bandwidth) at the expense of other tenants on the same host, database instance, or cluster, causing latency degradation that is invisible in the victim's own metrics but visible in shared infrastructure metrics.

Oversized Payload Memory Pressure

partial

API responses, message payloads, or database result sets grow far larger than expected, causing memory pressure in processing services, timeouts from serialization overhead, and failures in downstream systems that cannot handle the payload size.

Queue Backlog Accumulation

critical

Message queue or event stream consumer processing rate falls below producer write rate, causing consumer lag to grow unboundedly: eventually leading to increased end-to-end latency, producer backpressure, data expiry, or queue resource exhaustion.

Schema Migration Lock

critical

An ALTER TABLE or other DDL statement takes an ACCESS EXCLUSIVE lock that conflicts with every other lock type, including a plain SELECT's ACCESS SHARE. Once that lock request is waiting, every later query on the table queues behind it too, so a DDL statement that is merely waiting, not yet running, is enough to take the table's entire traffic down.

Slow Consumer

partial

A single consumer instance in a Kafka consumer group processes messages significantly slower than its peers, causing partition lag to accumulate on its assigned partitions and triggering consumer group rebalances that temporarily suspend all partition consumption.

Table and Index Bloat

partial

Dead tuples from UPDATE and DELETE operations accumulate in PostgreSQL heap pages and index pages when autovacuum cannot reclaim them fast enough, causing table and index storage to grow well beyond the live data size and degrading query performance through wasted I/O on dead pages.

Thundering Herd (Cache Stampede)

critical

When a popular cached key expires or a service recovers from downtime, all requests that were waiting or arrive simultaneously miss the cache and hit the origin database concurrently, producing a request spike that can overwhelm the database within seconds.

WAL Saturation

critical

PostgreSQL WAL (Write-Ahead Log) generation rate exceeds wal_buffers flush capacity or downstream replica/WAL archive bandwidth, causing write transactions to stall waiting for WAL flush and replication lag to grow unboundedly.

Write Amplification Cascade

critical

Each logical application write triggers multiple physical writes through index maintenance, WAL generation, MVCC versioning, and replication, causing actual disk IOPS to exceed the provisioned I/O ceiling while the logical write rate appears modest.

cascading

concurrency

Deadlock

critical

Two or more transactions each hold a lock the other needs, forming a cycle in the lock wait-for graph that no participant can escape on its own. The database breaks the cycle by aborting one transaction, surfacing a serialization-class error the application must catch and retry. Under sustained contention, naive immediate retries re-enter the same cycle and amplify it into a retry storm.

ETL Pipeline Lock Contention on Source Database

partial

When a bulk ETL job reads from the production OLTP database, it competes for shared resources: buffer pool, WAL, CPU, and transaction snapshot slots : causing OLTP query latency to increase during the ETL window. Beyond direct I/O contention, an open long-running ETL transaction prevents autovacuum from advancing its horizon, causing table bloat to accumulate and dead tuple count to grow. OLTP reads slowed by bloated tables compound the initial contention, producing a degradation window that outlasts the ETL job itself.

Long-Running Transaction Bloat

critical

A transaction that holds a snapshot open far longer than it does real work pins the database's xmin horizon, so VACUUM cannot reclaim any dead tuple newer than the snapshot, anywhere in the cluster. Bloat accumulates, freezing stalls (raising transaction-ID wraparound risk), and rows the transaction modified stay locked. One forgotten transaction degrades the whole database, not just the tables it touched.

Write Skew Anomaly

critical

Two concurrent transactions each read an overlapping set of rows, each confirms a multi-row invariant still holds, then each writes to a different row. Both commit. Individually every transaction is correct; together they break the invariant that no single one could have broken alone. Snapshot isolation (what PostgreSQL calls REPEATABLE READ) does not prevent it, because the two transactions never write the same row and so never collide. Only serializability, or an invariant enforced by the database itself, closes the gap.

configuration

consistency

Clock Skew

partial

Two nodes' clocks disagree at a given moment (skew), and each node's own clock accumulates its own error over time (drift). Systems that assume synchronized, monotonically advancing wall-clock time break in specific, predictable ways when either assumption fails: wrong event ordering, early or late expiration, and leases held by two nodes at once.

Dual-Write Inconsistency Between Systems

critical

When an application writes to two systems in sequence (database then search index, database then cache, database then analytics store) and the second write fails, the two systems permanently diverge. Without an automated reconciliation mechanism, the inconsistency is silent and persistent: queries to the primary store return the correct state while queries to the secondary store return stale or missing data indefinitely. No alert fires because no individual system reports an error: the inconsistency exists only in the gap between them.

Leader Election Storm

critical

A distributed cluster repeatedly cycles through leader election: each new leader is deposed shortly after taking over: causing the cluster to be unavailable for write operations for most of the storm duration.

Materialized View Refresh Contention

partial

When REFRESH MATERIALIZED VIEW is executed without the CONCURRENTLY option, it acquires an exclusive lock on the view that blocks all concurrent SELECT queries for the full duration of the refresh. For large views that require minutes to recompute, this causes a complete read outage on the view for the refresh window. Scheduled refreshes on high-traffic views produce predictable, repeated outage intervals that are often misattributed to query plan regressions rather than the lock acquisition pattern.

Saga Compensation Cascade

critical

When a distributed saga times out mid-execution and the compensating transactions for already-completed steps cannot be executed because the target services are also unavailable, the system is left in an irrecoverable intermediate state with no automated resolution path. The saga coordinator marks the saga as "compensating" but cannot drive it to a terminal state, resulting in indefinitely stuck business objects (orders, payments, reservations) requiring manual intervention.

Split-Brain

critical

A failover mechanism promotes a new leader without confirming the old one has stopped, so two nodes simultaneously believe they hold the primary role and both accept writes. The two histories diverge, and when the partition that triggered the failover heals, one set of committed transactions must be discarded.

data quality

messaging

Event Ordering Violation

critical

Events emitted by a producer arrive at a consumer in a different order than they were produced, so a consumer that applies events sequentially reaches an incorrect state, such as processing a "payment confirmed" event before the "order created" event it depends on. The fix is rarely a global order; it is preserving the order of events that are actually causally related, which is a much cheaper guarantee.

Kafka Consumer Group Rebalancing Storm

partial

When consumer group members crash, restart, or are deployed in rapid succession, Kafka triggers continuous partition rebalancing that prevents any consumer from accumulating enough stable assignment time to make meaningful progress. During the rebalance window all consumption is paused, and if restarts occur faster than the rebalance completes, throughput drops to near-zero while messages accumulate in the partition backlog.

Kafka Streams Changelog Topic Lag

partial

When a Kafka Streams application restarts, it must replay its changelog topic to restore the local RocksDB state store to the last committed position. If the changelog has grown large due to accumulated writes, the restore process can take 10–60 minutes, during which the stream task is unavailable. For applications with high-throughput stateful processing, state restoration on restart becomes the dominant availability risk, not application crashes themselves.

Zombie Consumer Holding Partition Assignment

degraded

A Kafka consumer becomes a zombie when its processing thread is paused (long GC, application deadlock, blocking external call) while its heartbeat thread continues to run in the background, signaling liveness to the broker. The broker considers the consumer healthy and does not trigger a rebalance. Messages assigned to the zombie's partitions accumulate unprocessed. The consumer group lag grows silently until max.poll.interval.ms (default 5 minutes) is exceeded and the broker finally forces a rebalance: 5 minutes of guaranteed message accumulation per event.

multi tenancy

network

operational

query

replication

Asymmetric Replication Topology Failure

critical

When a read replica diverges from the primary by silently skipping or misapplying transactions, queries to the replica return factually incorrect data with no error, no exception, and no replication error in the logs. The divergence accumulates undetected over days or weeks until a data audit reveals the discrepancy. All reads served from the diverged replica during this window are potentially incorrect, and no automated mechanism in the replication layer detects or corrects the divergence.

Cross-Region Replication Drift

partial

When multi-region replication falls behind during write spikes, reads directed to secondary regions silently return stale data beyond the application SLA. Unlike an outage, the system appears healthy: queries succeed, latency is normal: but users in secondary regions observe data that may be minutes or hours old, with no automatic alerting unless explicit replication lag SLO monitoring is configured.

Replica Divergence

critical

A replica in a single-leader replication topology applies changes differently than the primary did, producing a permanent state difference rather than a temporary lag. Reads from the replica return data the primary never contained, not stale data that will eventually catch up, and nothing about the replica's own error state signals that anything is wrong.

Replication Lag Cascade

partial

Asynchronous replicas fall behind the primary under write load and serve reads from an older version of the data. Reads keep succeeding, so nothing errors; what breaks is one of three specific consistency guarantees (read-after-write, monotonic reads, or consistent prefix), each with a distinct user-visible anomaly.

resilience

sharding

storage

B-Tree Index Fragmentation

degraded

When frequent update and delete operations leave B-tree index pages partially filled, index scans must traverse more pages than the data density justifies, producing read amplification. Storage utilization inflates, index cache hit rates fall, and query latency for index-range scans increases progressively as the table accumulates write churn. The degradation is gradual and often unnoticed until query plans change or periodic REINDEX maintenance is missed.

LSM Compaction Debt

critical

In a log-structured merge-tree (LSM) engine, sustained write rate outpaces the background compaction process that merges on-disk SSTables. The number of SSTables a read must check grows (read amplification climbs), and once the backlog crosses an engine-defined threshold, the engine deliberately slows or stops accepting writes to keep worst-case read latency bounded, rather than let read amplification grow without limit.

Read Amplification (LSM Tree)

critical

In LSM-tree storage engines (Cassandra, RocksDB, LevelDB), a single logical read may require checking multiple immutable SSTables across multiple levels of compaction before the most recent version of a row is found: multiplying I/O by the number of levels checked and producing latency spikes on reads that cross many levels.

Secondary Index Write Saturation

partial

When a table carries many secondary indexes, each INSERT or UPDATE must maintain all indexes, amplifying the write I/O by the number of indexes. At high write throughput (10,000+ inserts/second), index maintenance saturates WAL throughput, storage I/O bandwidth, or shared_buffers write capacity, causing write latency to spike from sub-millisecond to tens of milliseconds. The amplification grows linearly with index count and write rate, making this failure predictable but frequently discovered only after a traffic spike.