Restart core on low memory

Since upgrading to 2021.10 branch, I’ve (like others) the issue (like others), that the core was shutting down after some time (maybe of high memory usage) … after it, I’ve to start it again via ssh (cause observer only observes supervisor, which is still fine).

Is there anyway to work around this by rebooting the core when memory reaches eg 95%?

You should try and fix what’s causing the memory leak. If the core is running out of memory, it’ll be an integration that’s causing the problem. Figure out which one it is write up an issue targeting that integration (not the core as a whole), and then remove it until there is a fix. If it’s not core, figure out what is running out of memory and remove it.

That was my initial idea… but seems Devs are not interested in this, cause issue was just closed.
The only thing which was changed was the upgrade from .9 to .10 :confused:

It’s not the dev’s job to figure out which integration has the problem. That would be a needle in a haystack especially if they can’t replicate it. You have the problem, you have to figure it out.

To put it into perspective, without you giving an idea of what integration it is, and based on your average startup time. If they were to go 1 by 1 with each integration for 1.5 days (to see if it’s a memory leak) it would take approximately 8 years to find the integration as a worse case scenario.

So, go 1 by 1 with your integrations, remove each one and run it for a few days but start with the integrations that would probably have the issue. But remember, only do this if you can 100% say that core is what has the memory leak. Keep in mind… If your core memory stays the same throughout it’s 1.5 day life but it’s running out of memory, then it’s not core that’s the problem. Something else is eating up the memory and core get’s impacted by it.

Maybe the new Tuya integration… was it changed from 9 to 10? … Will report, if I found the integration, which causes the issue. Any tools which would help? I can see startup times for integrations, but no memory usage.

Maybe also check the other posts regarding automatically shutdown, maybe there is an integration named which is also used by me.

Thanks for suggestions and tips :+1:

I’d start by looking at your HA logs and fixing all the errors if you don’t know where to start.

Or topping up the memory :wink:

But looking at numbers, It didn’t looks like the memory really running out:

BTW, no errors ftm