Add-ons fail to start

I have several add-ons. Sometimes, when HA is restarted, any one of these add-ons fails to start randomly. There is no specific add-on which fails every time, startup failure does not happen every time. So, it is totally random, but happens once in a while. When an add-on fails to start, the automations/scripts that rely on that add-on fail. Then I keep wondering what happened till I realize that the add-on is not running. This is not an ideal situation.
Question is: what can be done to make sure that any add-on which fails to start with HA restart is attempted to start again and if it fails for any reason, some kind of notification can be send to phone app or other notification service?

Thanks

That is for integrations, not add-ons.

For add-ons, this is an example

- id: '1565194745362'
  alias: Status bij opstarten HA
  trigger:
  - event: start
    platform: homeassistant
  condition: []
  action:
  - delay: 00:15:00
  - condition: state
    entity_id: binary_sensor.letsdnsocloud_running
    state: 'off'
  - service: hassio.addon_start
    data:
      addon: 3983e8d8_letsdnsocloud

So, this is for a specific add-on. But, my issue is that I have like 12 add-ons and any one of them randomly fails to start. Would I have to write an automation like this for every add-on?

Thanks…!!

Unfortunately, yes
Just open it up in an editor, copy and past the template 12 times, and adjust just entities :frowning:

Hello ArunGupta,

You didn’t say what your server is or your install type was, but are you perhaps low on memory?

I’ve had a similar experience in the past and it simply came down to a loose network cable. Took me a while to narrow it down, as HA generally worked fine otherwise.