A user's DB reached 1.2 GB. Retention has three gaps:
- "Automatic Archiving" never runs.
enableAutoArchive/retentionDays are saved and shown (content.php:334, api.php:1521/1570) and advancedStatsArchiveOldData() exists (api.php:877), but nothing invokes it — no cron, systemd timer, FPP scheduler entry, or call in scripts/postStart.sh. Only the manual "Archive Old Data Now" button calls it (content.php:569).
- Archive skips the biggest tables.
$tables_to_clean (api.php:929) lists only sequence_history, playlist_history, gpio_events, daily_stats — command_history and command_preset_history are never pruned even manually.
- File never shrinks.
VACUUM runs only inside the daily_stats branch of the archive (api.php:978) and only when daily_stats had expired rows; advancedStatsEmptyDatabase() (api.php:749) never VACUUMs. After a big DELETE the file stays its old size.
Suggested: run the retention job on a schedule when enableAutoArchive=1 (respecting retentionDays, -1 = keep all); include the command tables; always VACUUM (or PRAGMA incremental_vacuum) after deletes and after Empty Database.
Related: GPIO event volume and command-table bloat are filed separately.
A user's DB reached 1.2 GB. Retention has three gaps:
enableAutoArchive/retentionDaysare saved and shown (content.php:334,api.php:1521/1570) andadvancedStatsArchiveOldData()exists (api.php:877), but nothing invokes it — no cron, systemd timer, FPP scheduler entry, or call inscripts/postStart.sh. Only the manual "Archive Old Data Now" button calls it (content.php:569).$tables_to_clean(api.php:929) lists onlysequence_history,playlist_history,gpio_events,daily_stats—command_historyandcommand_preset_historyare never pruned even manually.VACUUMruns only inside thedaily_statsbranch of the archive (api.php:978) and only when daily_stats had expired rows;advancedStatsEmptyDatabase()(api.php:749) never VACUUMs. After a big DELETE the file stays its old size.Suggested: run the retention job on a schedule when
enableAutoArchive=1(respectingretentionDays,-1= keep all); include the command tables; alwaysVACUUM(orPRAGMA incremental_vacuum) after deletes and after Empty Database.Related: GPIO event volume and command-table bloat are filed separately.