Litestream's per-sync INFO lines flood the journal: ie box keeps ~2h of logs Issueclosed
Claimed by claude~paul@keymail.dev3 weeks ago
claude agent, operated by paul@keymail.devdriven by paul@keymail.devsession a426bc1f · claude-code/2.1.321 · DOCS-T1
What happened
On the ie box (i-025a0b70f3d93304d), journald is capped at SystemMaxUse=256M (/etc/systemd/journald.conf.d/50-cap.conf), and Litestream writes one INFO replica sync line per database per sync. In a ten-minute sample (2026-11-10 08:00–08:10 UTC): litestream 36,868 lines, carlos 3,426, the titogo router 192. That's about 220k lines an hour, so the oldest entry still in the current boot's journal on 2026-11-10 09:30 was from about 07:40 the same morning.
Examples: level=INFO msg="replica sync" system=store db=registry.db …, db=console.db, and one per instance DB.
Why it matters
Anything older than about two hours is gone. Today I couldn't count yesterday evening's early-access spam refusals on ti.to/home because the router's lines had already been vacuumed. Any incident noticed after a couple of hours has no logs to look at.
What would fix it
One of:
Run Litestream at WARN (or turn per-sync logging off) in carlos-apps-litestream.service / carlos-console-litestream.service, and on every box the bootstrap arms.
Give those units their own LogLevelMax=warning, so the app units keep their INFO.
Raise the journal cap. That only stretches the window and doesn't fix the cause.
claude agent, operated by paul@keymail.devdriven by paul@keymail.devsession 81058f97 · claude-code/2.1.321 · DOCS-T1
Taking this on branch litestream-quiet-802.
Plan: option 1, not option 2. Litestream writes plain slog text to stdout, and journald stamps every stdout line priority 6 (info) whatever slog level it carried, so LogLevelMax=warning would drop Litestream's ERROR lines too. Instead:
carlos-litestream.service gets Environment=LOG_LEVEL=warn (Litestream v0.5 reads it in InitLog), so every box the bootstrap arms runs at WARN.
The activator's embedded replicator (internal/lease, hibernating instances) logs the same replica sync line into carlos's own journal through slog.Default(); give its store a WARN floor too.
The ie box's units (carlos-apps-litestream.service, carlos-console-litestream.service) are hand-made, not in the repo, so they need a hand drop-in after review.
claude agent, operated by paul@keymail.devdriven by paul@keymail.devsession 81058f97 · claude-code/2.1.321 · DOCS-T1
ie box (i-025a0b70f3d93304d), 2026-11-10 ~11:00Z, with Paul's OK: drop-in 60-log-level.conf (Environment=LOG_LEVEL=warn) added to four units and each restarted one at a time:
carlos-apps-litestream.service, carlos-console-litestream.service (the two named above; they turned out to be quiet already, a few lines a minute)
carlos-litestream.service: the actual flood, about 1,800 INFO lines every 30 s from the platform unit
carlos-registry-litestream.service: small
After: all four active, NRestarts=0, 0 litestream lines in the following 40 s. Journal at 241.7M of the 256M cap before; the window should now grow back to days.
carlos-litestream.service on that box also carries the hand-made memory-max.conf from #284. The new drop-in becomes redundant once a release carrying this branch rolls the unit file; removing it then is optional (same setting). Branch: litestream-quiet-802.
claude agent, operated by paul@keymail.devdriven by paul@keymail.devsession 81058f97 · claude-code/2.1.321 · DOCS-T1
Correction to the reply above: I didn't measure the two named units on their own before restarting them, so "quiet already" is unverified. What I did measure: after they were restarted at WARN, every remaining line came from carlos-litestream.service (1,825 in 30 s) and carlos-registry-litestream.service (19).
claude agent, operated by paul@keymail.devdriven by paul@keymail.devsession 81058f97 · claude-code/2.1.321 · DOCS-T1
Merged as 3a8eabd, not released. Every other box keeps flooding until a release carrying it rolls (carlos-litestream.service gets LOG_LEVEL=warn; the embedded replicator logs at WARN). ie is already quiet through the drop-ins above. Closing; the roll is the remaining step.
claude agent, operated by paul@keymail.devdriven by paul@keymail.devsession 81058f97 · claude-code/2.1.321 · DOCS-T1
Follow-up, 2026-11-10. Two things found after v0.34.40 rolled:
The update path rewrote carlos-litestream.service and ran daemon-reload but never restarted the running replicator, so it kept logging at INFO until someone restarted it by hand. Fixed on branch litestream-unit-restart: an apply now try-restarts the replicator when its unit file changed. The same branch writes logging: level: warn into the generated /etc/litestream.yml. It rides the next box release.
The flagship's Irish box (annie) still logs at INFO (~30 lines/min) and stays that way on purpose. Its binary is Litestream v0.3.13, which ignores LOG_LEVEL but reads logging: level: from its config. Its /etc/litestream.yml is written by hand, so neither fix reaches it. Decision (8a3d302): leave annie as it is until the durability §5.1 cutover moves it to the generated config and 0.5.15. A binary upgrade on its own isn't the fix, because it changes the replica format. At the cutover, check journalctl -t litestream --since -1min | wc -l ≈ 0 on annie.