Open roblamoreaux opened 8 months ago
I mistyped above and the non-beta version of ESPHome is 2023.12.9.
Looks like there's not enough RAM
Looks like there's not enough RAM
yes I know that it is insufficient RAM. my issue is it no longer kills ESPHome but causes the whole system to restart
add swapfile
@roblamoreaux By the "whole system" you mean the OS as whole or just main system components running in containers? I expect when it runs out of memory, the OOM killer starts killing things. It may eventually kill containerd, which would probably end up with all containers being restarted. Also I'd expect some messages to show in the host logs then, but maybe they're only in the host dmesg
? :thinking: Can you check with HDMI and keyboard attached?
In any case, if you're running low on resources and the compilation is very demanding, there's not much we can do on OS side to make it pass. But I absolutely agree it should try to behave well and it should be obvious what went bad.
I'll plug the monitor in tonight and try compiling again. I'm not sure how much restarts, just know that everything stops responding then the browser shows the core start up messages.
I agree well behaved is the addon getting restarted and the core HA tasks keep running. That is what I saw before this.
So this morning I updated to ESPHome 2024.2.0 hooked up the monitor and keyboard and tried again. The monitor showed the same messages it does when I power up the Odroid and at the CLI prompt I can't get any response except the same error message. Everything else seems to work, so I'll try to get a chance tonight or tomorrow to SSH as root and see if I can get anything different. Hopefully the pictures below come through. If not I'll try again after I get to work.
wrong second picture above...
I seem to experience this same issue while trying to update my S3-BOX to 2024.4.2 The memory consumption shoots up at one point during compiling and Home Assistant then reboots.
Same issue here. Installation onto S3 BOX stops at the same point everytime and causes HA to restart.
My home assistant is also crashing while updating or compiling yaml for ESP32 Devkit. I can update and compile for ESP8266 without issue. I am using Raspberry Pi 3B with 1GB, so it should be RAM issue and I want to update but not sure to go with NUC system or Raspberry Pi and then how much is enough ram is also not clear, people with 4GB is having a problem so how much should be good enough 8GB? 16GB? Till then, I have installed python and esphome on windows 11 and can compile esphome yaml under a minute and then update the program using esphome web.
I've also started seeing esphome in my HA add-on take down my entire HA instance on my Raspberry Pi 4 ~(8GB)~ which had been previously more than capable. It started for me in late July. It appears I it doesn't make it far into compiling before it takes down HA and I lose my connection.
Interesting, I thought this was memory related because my Raspberry Pi only has 2gb of memory. But if this happens on 8gb systems as well, it becomes even harder to explain.
I can still work around the issue by shutting down most addons (Grafana, smb, ssh, matter etc) and then performing the esp update. Does that work for you?
@TexTown after stopping a couple of other add ons I was able to successfully compile and install for the update in esphome. I suspect your observation on the memory is accurate, in whatever way that HA does or doesn't manage memory for and between add ons. Also of note, I forgot which Pi was which and I'm also running on a 2GB.
Install this to increase your swap space. It's an addon, but it only runs at startup to add the extra swap space, and then ends. https://github.com/TazzerMAN/increase_swap_addon
I've installed the addon, increased the swap size to 2GB and can now successfully update ESPHome devices without the need to stop other addons. This is great, thanks @dpgh947 for the tip.
Brilliant, you're welcome. I also have a 2gb pi4 and I also had trouble with esphome compiles.
Install this to increase your swap space. It's an addon, but it only runs at startup to add the extra swap space, and then ends. https://github.com/TazzerMAN/increase_swap_addon
I want to thank you greatly for this tip. My HA install rebooted not only when compiling for ESPHome but also other instances and this seemed to have solved it.
So... Thanks!
Cheers, you're welcome
Describe the issue you are experiencing
When I compile NS-Panel Blueprint on my Odroid N2+ (4GB) with too many other things running it used to restart the ESPHome addon. Now with ESPHome 2024.2.0beta (and 2023.12.2) and OS version 12.0.rc1, supervisor 2024.02.0, and Corte 2024.2.2, it causes Home Assistant to restart. Turning off other add-ons such as Music Assistant reduces the chance of crash since ESPHome can get more resources.
What operating system image do you use?
odroid-n2 (Hardkernel ODROID-N2/N2+)
What version of Home Assistant Operating System is installed?
12.0.rc1
Did you upgrade the Operating System.
Yes
Steps to reproduce the issue
Anything in the Supervisor logs that might be useful for us?
Anything in the Host logs that might be useful for us?
System information
None
Additional information
As noted above I have had an issue where compiling NS-Panel Blueprint ESPHome Yaml code would crash ESPHome due to insufficent resources and stopping other add-ons (especially Music Assistant) would free up enough resources for the compile to work. Now instead of restarting ESPHome the whole system restarts. This behavior is much worse where restarting ESPHome was acceptable if not desirable.