Multiple homeassistant instances running

Randomly I get more than one homeassistant instance running in my container. I am running HASSOS on an RPI4 - everything is up to date.

When this happens my logs start filling up with timeouts as such :

2022-06-21 01:54:22 WARNING (MainThread) [homeassistant.components.binary_sensor] Updating command_line binary_sensor took longer than the scheduled update interval 0:00:10
2022-06-21 01:54:22 WARNING (MainThread) [homeassistant.helpers.entity] Update of binary_sensor.ps5 is taking over 10 seconds
2022-06-21 01:54:32 WARNING (MainThread) [homeassistant.components.binary_sensor] Updating command_line binary_sensor took longer than the scheduled update interval 0:00:10

Here’s the result of top :

I kill the pid with the highest id and everything goes back to normal. Sensors resume working etc.

I don’t understand why it’s spawning another homeassistant process. Any ideas?

FYI the command_line process is this but it also takes out WLED/LocalTuya/Linkplay etc. I’ve already uninstalled them all one by one to see if they were the issue

  - platform: command_line
    name: ps5
    command: python3 /config/sensors/ps5.py -q -b 192.168.1.225
    scan_interval: 10

I have written an automation to kill these for now - I guess I’m the only person with this issue!

Basically got one script checking for multiple instances of HA and then another running this :

pgrep python3 |awk 'NR >= 2' | xargs -n1 kill -9

I’ve been checking mine since you posted this. I’ve only ever seen one instance.

No idea why this is happening to you.

Is there anything unconventional about your installation?

Is anything calling this API endpoint /core/start ?

Hi,

Nothing unconventional. It’s the 64bit install of HASSOS on an RPI4. Last night it decided to pick on the Digital Ocean binary sensors - and filled my logs with pages of timeouts. I kill the rogue one and everything is happy and there is no requirement to restart HA.

It’s bloody annoying but thanks to psgrep at least I don’t need to manually kill them - I’ll know if it gets fixed in a release when it stops sending me alerts :wink:

Not that I am aware of - anywhere I can look to see if this is being called?

Do a text search of your /config folder for it.

I just did that :slight_smile: Nothing in there according to notepad++

Yeah it was a long shot.