11-18-2023, 05:46 PM
(11-18-2023, 03:28 PM)the_bertrum Wrote: Love that monitor feature Tim, thanks very much. If one accepts the default settings (6 second interval and 3 under-run messages) would it take up to 18 seconds to restart?
It depends on how often the xrun messages are written to the MPD log.
Each time the monitor wakes up it reads the messages in the log that were written since the last time it woke up. If a message is an xrun message a counter is incremented and checked against the threshold to determine whether to restart MPD. The monitor then goes to sleep.
So basically if threshold number of xrun messages occur in < sleep_interval then MPD restart will occur in max 1 x sleep_interval secs. When I was looking at the MPD log to get a sense of how long to took to see 3 xrun messages during a stalled stream it looked like 6 seconds would be a reasonable default sleep_interval.