volumio / volumio3-os

GNU General Public License v2.0
55 stars 38 forks source link

enable "Restart=on-failure" for shairport-sync #44

Closed joshuahhh closed 9 months ago

joshuahhh commented 2 years ago

I've run into a scenario which crashes shairport-sync.

  1. Connect to Volumio AirPlay from two devices.
  2. Play audio from both devices.

As seen in this log, this crashes shairport-sync with a segfault. Currently, nothing starts it back up except a reboot. With this configuration change, shairport-sync will automatically restart. (Presumably there's some bug in shairport-sync itself, but I'm less interested in fixing that than I am in making Volumio robust to it.)

Please let me know if there's anything else I can do to help. Thanks so much!

Darmur commented 9 months ago

@volumio can we check this? it looks legit

volumio commented 9 months ago

Yeah, looks right on point.

@joshuahhh one futher point of improvement, which we generally do, is adding a delay to restart the service, so it doesn't get stuck in an endless restart loop. We can merge if you could add:

RestartSec=3

to the systemd unit

thanks a lot!

ashthespy commented 9 months ago

which we generally do, is adding a delay to restart the service, so it doesn't get stuck in an endless restart loop.

FWIW: RestartSec will just add a delay between each restart attempt. It doesn't limit the number of restarts. Considering using StartLimitIntervalSec along with StartLimitBurst instead.

This ensures the service is launched a defined number of times, before stopping the service. So a faulty config or something doesn't end up in an endless restart loop..

joshuahhh commented 9 months ago

I've moved away from using Volumio in the last 18 months, but you're welcome to take over this PR. Thanks.

ashthespy commented 9 months ago

I've moved away from using Volumio in the last 18 months, but you're welcome to take over this PR. Thanks.

Thanks for your efforts, good luck out there! :-)

volumio commented 8 months ago

@ashthespy why closed? can't we merge it and add your suggestions contextually?