Skip to content

Efficiency: all-host MQTT subscription, no WAL/batching, per-message log spam #10

Description

@pgianotto

Not the primary size cause, but amplifies the growth issues and can fill the disk independently:

  • All-host subscription: TOPIC_ALL = _TOPIC_BASE + "/+/#" (mqtt_listener.py:59). On a multisync network each instance logs every player's events into its own DB. Scope to the local hostname unless cross-host tracking is intended.
  • Write path: stats_db.py opens → INSERT → commit → close per event, then opens another connection for daily_stats. No PRAGMA journal_mode=WAL, no transaction grouping. Use one persistent WAL connection.
  • Log spam: on_message (mqtt_listener.py:135) writes a line to /home/fpp/media/logs/fpp-plugin-AdvancedStats.log for every MQTT message, including 1 Hz playlist/sequence/secondsElapsed it then ignores. Gate verbose logging behind a debug flag.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions