Cases2 cases
1 to 2 of 2
IL-0281PostHog's Logs ClickHouse cluster silently deleted almost all its S3 data, losing US logs older than 3 daysPostHog2026- Symptoms
On 19 February 2026, a node of the ClickHouse cluster behind PostHog's Logs product crashed, restarted and could not start again because it could not find a large amount of its data. Engineers then found that almost all of the Logs data stored on S3 was gone, so logs collected in the US region more than 3 days earlier were lost. Only the Logs product was affected.
- Trigger
At 10:54 UTC a routine mutation was run to materialise an index. When it finished at 11:02, it set off a bug in ClickHouse's zero-copy replication.
- Root cause
- Component
- Contributing factor
- Detection
No automated alarm fired. At 19:40 UTC a node in the cluster crashed, restarted and failed to start because of the missing data, and the engineers who investigated found that most of the S3-backed data was gone.
- Remediation
- Switched Logs to a new table without zero-copy replication and caught up on recent messages
- Backfilled the Logs data from the 3 days of Kafka history
- Action items
- Disable zero-copy replication on all clusters
- Audit the whole Logs ClickHouse configuration and keep experimental features out of production
- Enable S3 versioning on the storage buckets so objects deleted by a database bug can be recovered
- Spot-check configurations and data integrity strategies for single points of failure before a product becomes generally available
- Lessons
Running Logs in its own cluster kept every other product unaffected, and 3 days of Kafka retention saved the recent data. An experimental setting chosen for an early internal stage was allowed to stay in production. Monitoring covered only incoming and recent data, so petabytes were deleted over 8 hours without an alarm. Relying on database replication alone over shared storage was a single point of failure, and S3 versioning would have let the deleted files be recovered.
IL-0390PostHog US Cloud event ingestion slowed to delays of up to 2 days as writes to the Persons Postgres table stalledPostHog2025- Symptoms
From 11 November 2025 at 16:02 UTC, PostHog's event ingestion pipeline for US Cloud became severely degraded, and events for all customers in the US region were processed with delays from 10 minutes up to 2 days. Writes to the Postgres database that stores Person information could take multiple seconds per update, and the pipeline slowed until no standard scaling option helped.
- Trigger
The 32-bit OID space used to track TOASTed values of the Persons table's properties column, a JSONb field that often exceeds the 2KB threshold for out-of-line storage, was nearly exhausted.
- Root cause
- Component
- Contributing factor
- Remediation
- Created a new partitioned Persons table with a fresh TOAST table and OID space
- Added database triggers to keep the old and new Persons tables in sync for live writes
- Copied the existing Person data from the old table to the new one with a backfill script
- Changed ingestion and application code to write to the new table and read from it first, with fallback to the old table
- Deployed the web app changes to production under manual control rather than a fully automated rollout
- Scaled ingestion workers to process the accumulated backlog
- Paused ingestion when the MSK local disk reached about 85%
- Reduced the local retention of the affected Kafka topic
- Resumed ingestion after confirming there was enough disk headroom
- Moved the backfill into Dagster to finish it over the weekend
- Action items
- Add metrics and alerts for heavy disk read amplification per write
- Add metrics and alerts for TOAST table statistics
- Add metrics and alerts for other Postgres engine limits that matter at large scale
- Write runbooks for engine-level Postgres limits, with decision trees for migrating versus repairing in place
- Create customer communication runbooks with a clear escalation path and redundancies
- Evaluate other data stores for the persons database
- Complete the reconsolidation on the new Persons tables
- Improve the backfill tooling and the safeguards for Kafka tiered storage
- Design and operate Person-like tables so they avoid similar limits
- Lessons
TOAST OID exhaustion degrades writes long before the hard limit of about 4 billion OIDs, it is rare even at large scale, and standard dashboards for CPU, memory, IOPS and lock contention did not immediately point at it, so diagnosis took a day and a half without monitoring of TOAST growth, OID usage or disk reads per write. Many core features depended on timely updates to the persons table, so its slowdown reached a wide part of the product. The first backfill approach lacked visibility for a long migration, the Kafka tiered storage settings and alerts were not tuned for a large backlog, and the people who normally handle customer communications were all unavailable.
These 2 cases involve Database and Database backups and snapshots. kubegap audits a Kubernetes cluster for gaps like these, read-only, from Claude Code or Codex; its checks cite public reports like the ones in this library.
By root cause2
Software defect1 case
- Contributing factor
- Organisation
Capacity exhaustion1 case
- Component
- Contributing factor
- Organisation