- Nov 26, 2026
- 4 min read
The Dashboard Looked Healthy. It Wasn't Writing Anything.
Both incidents had the same shape: everything looked fine, and the system was quietly not doing its job.
Incident 1: 40 hours of nothing
October. The dashboard was up. Charts rendered. Tiles showed numbers.
It had stopped storing readings 40 hours earlier.
What had happened:
- The host disk reached 99%.
- On restart, the embedded ingester failed during SQLite initialisation:
SqliteError: disk I/O error (SQLITE_IOERR_SHMSIZE). That error can mean the filesystem is out of space, not that the database is broken. - The broker logged
no space left on device. - The dashboard process, being read-only, kept serving the old data perfectly.
A red herring made it slower to see: an old standalone ingester container was
still around, failing to reach MQTT on 127.0.0.1 over and over. Its errors
were loud and irrelevant. It wasn’t the writer for this dashboard at all.
Recovery: free up disk space, restart the container, watch it reconnect and resume. One lesson for next time: Docker build cache can quietly grow to tens of GB, so check disk space before builds.
The check I now always do around a rebuild: row count before and after.
1,002,225 → 1,002,242. Same database, still growing. The live deploy syncs
source into a separate build folder with --exclude data/, so a rebuild can’t
replace the database. And the repo’s ./data folder isn’t the production
database; the bind-mounted one on the data disk is. Knowing which file is live
matters most when you’re stressed.
What changed: watch the writer, not the web page
- A reachable dashboard proves nothing about the ingester. MQTT freshness and database write freshness are now checked separately.
- ntfy alerts from the ingester: temperature or humidity outside thresholds, no MQTT data for 15 minutes, and a daily summary.
- Notifications are best-effort. No token, ntfy down, an HTTP error: the ingester logs it and carries on. Alerting must never be the reason ingestion stops.
- The ntfy server denies everything by default. The dashboard has its own write-only account for its one topic.
One more debugging moment: the first test alerts never reached my phone. The server showed them as delivered to subscribers. The phone app was subscribed to the topic name with one letter missing. Check the exact server URL and topic before touching the server.
Incident 2: the day my history “disappeared”
I removed the live SQLite file from Git tracking, so telemetry would stop being committed. The dashboard kept working. Hours later I recreated the container, and the charts were empty.
The database wasn’t corrupted. The order of events was the problem:
- Removing the file from Git deleted its path on disk.
- The running container still had the file open, so Linux kept the data alive. Ingestion and queries carried on as normal.
- Recreating the container closed the last handle. The data was gone from the filesystem, and the ingester, finding no file, created a fresh, empty one and started filling it.
The tell, had I looked: readings.sqlite was missing while its -wal and
-shm files were still there.
Recovery, which was a non-event because a verified backup existed from earlier that day:
sqlite3 "file:$backup?mode=ro" 'PRAGMA quick_check;' # ok
docker compose stop dashboard
mv data/readings.sqlite* "$recovery_dir"/ # keep the new file, don't delete
sqlite3 "$backup" ".backup '$live_db'"
sqlite3 "$live_db" 'PRAGMA quick_check; SELECT COUNT(*) FROM readings;'
docker compose up -d --build
453,195 rows back, June to October. Moving the empty database aside instead of deleting it kept the recovery reversible, and moving its WAL and SHM files with it stopped SQLite from applying stale state to the restored file. Only the dashboard stack was touched; the broker and Zigbee2MQTT run separately and never noticed.
Backups, properly
- Git LFS is not a backup. It stored snapshots, not live data, and nothing after the last commit.
- A real backup is a
.backupcopy outside the repo, permissions0600, checked withPRAGMA quick_check, with its SHA-256 written down. - A second file on the same disk protects against mistakes, not against the disk. The next step is an encrypted copy on another machine.
Takeaways
- Monitor the writer. A healthy web page and a dead ingester look identical.
- Check disk space before Docker builds. Build cache grows silently.
- An open file handle can make a deleted database look healthy. Check
statbefore restarting anything after Git cleanup. - Row count before and after every deploy that touches data.
- Backups outside the repo, verified, with a hash.
That’s the series. Next for this project: the battery chart, October firmware against the winter firmware, same panel, same battery. Once it’s measured, it shows every layer of this series in one picture.
Part 8 of 8. Start with the series overview.