Skip to content
2026-04-27 8 hour data loss in QuestDB

2026-04-27 8 hour data loss in QuestDB

Date2026-04-27
AuthorsNéstor Salceda
StatusRecovery in progress
SummaryQuestDB associated disk was full and couldn’t write more data. This also lead to materialized view invalidation.
ImpactAbout 8 hours of network flow data were lost
Root CausesFull disk and not enough hardware
TriggerWriting to a full disk
ResolutionUpsizing the droplet to a 2cpu and 2GB with 90GB of hard disk
DetectionChecked by regular basis, but error logging worked fine.

Action Items

Action ItemTypeOwnerBug
Recover old data for the applicationmitigateNéstor Salcedasafetybits#2606
Add monitoring alert for 80% disk usagepreventNéstor Salceda
Add alerts for errors in betterstackpreventNéstor Salceda
Keep 30 days of old raw data to allow full rebuilds without data losspreventNéstor Salceda Alonsosafetybits#2606
Keep data in a separate volumepreventNéstor Salceda Alonso

Lessons Learned

What went well

Betterstack as observability solution showed the errors.

What went wrong

We didn’t receive any notification from monitoring systems.

We waited too much to increase disk space because first observation was done in the morning.

QuestDB view invalidation means running a FULL rebuild, meaning to lose all data

Where we got lucky

The other parts of the system were working

Timeline

2026-04-27 (all times CEST)

  • 9:30 Disk were at 87%
    • Thought about resize at the end of the day
  • 11:10 Started to receive errors in Betterstack
  • 19:00 Checked full disk in DigitalOcean dashboard
  • 20:00 Start recovering process
    • Checked that materialized views were invalid
    • We only had 2 days of raw network flows without any compression so getting a full rebuild will mean to lose any data
    • Going forth and back trying to recover from a point in time
    • Finally, copy data from aggregated view to a simple table and we will recover data by modifiying the queries
      • Duplicate the materialized views with a new base
      • Query by using UNION

2026-04-28

  • 9:00 Checked disk usage