Esphome 1.18 .0 freezes HA since when updated HA to 2021.5.5 at api_server.cpp

Hi
I have been using Esphome on since last month(new to HA). Everything was running perfectly fine until Esphome 1.17.0 and HA 2021.5.3.
But since then latest upgrade ESPHome freezes at “api_server.cpp” line while while creating new node, or even updating or compiling the node.
|-- 1.0
|-- 1.2
| |-- 1.0
|-- 1.1.1
| |-- 1.0
Compiling /data/power_sw_d/.pioenvs/power_sw_d/src/esphome/components/api/api_connection.cpp.o
Compiling /data/power_sw_d/.pioenvs/power_sw_d/src/esphome/components/api/api_pb2.cpp.o
Compiling /data/power_sw_d/.pioenvs/power_sw_d/src/esphome/components/api/api_pb2_service.cpp.o
Compiling /data/power_sw_d/.pioenvs/power_sw_d/src/esphome/components/api/api_server.cpp.o

Please Guide.
Thanks

What is you HA hardware?

Raspberry Pi 3B+.
And tried every thing viz. Re-installing many times, re-installing on other sd card and only loading HA +Esphome.
Also tried restoring from sanpshot while loading 1.17.0 of esphome.
while restoring from snapshot the HA version of snapshot which was 2021.5.3 gets upgraded to 2021.5.5 by itself.
Even tried uninstalling all other addons and configuration.
But no change.
So at present I have installing HA on 2 sd cards and tried again. But all failed.
Also let me know if there is any possiblity that esphome can run from any other way, viz windows or linux on pc. or else.
Also observing that now its recovering from that freez due to esphome but still the purpose is getting defeated as compilation or update to every thing not working.

Thanks

I think there is a bit of evidence that the RAM in an rpi3 is too little.

You don’t need to run it on the same computer as home assistant. Read Getting Started with ESPHome — ESPHome

Thanks…I am also looking for this to install it on somewhere else too. Will work on this too.

Meanwhile its a matter of concern that if it worked earlier it should also be made to work now too. Some wayaround need to be worked on.

I understand and also monitored memory during its use and also found that memory drain takes place.

Software gets more complex in each iteration. Sorry about that.

Yes, and politicians should do something about climate change, cancer and bullying.

Compiling c++ uses memory, who’d have thought.

Hello,
I’m also experiencing same issue. But I can’t catch when It started to occur, after update to HA core 5.5 or after update ESPHome to 1.18.0… But the effect is that after one day of doing nothing in ESPHome, and when I want to compile new binary it freezes at compiling /api_server.cpp.o so hard, that I must reset host because it’s not responding to input via HA or directly SSH. It happens now everyday (after work I’m doing some changes in different nodes configuration and there’s 100% chance that first compile with freeze host. After that, it works good for next 5-7 compilations and then story begins again) so it’s not one-time-issue. I wasn’t doing any major changes in HA or host.
I’m using ESPHome for over 2 months and everything was working without problem
Unfortunately there’s no errors in logs. Hosts only purpose is hosting HA (Debian installation, no VMs)

Host Spec:
HP T620 AMD GX-415GA
6GB RAM
128GB SSD

I usually take full snapshot once any new addon having configuration requirement and download it to pc. HA while re-installing now updates to newer version 5.5 and now when I tried restoring esphome 1.17 , it still freezes the Home Assistant such that you have to reboot it.

After so many installs I found that the problem is taking place due to HA latest update of 2021.5.5 when running on Pi3 B+ .

The problem is still same with fresh install of HA with only Esphome on Pi3 B+

Its working good on Pi4 (4gb) module.

home assistant and esphome are independent.

I’ve found out the issue. 1 ram card is broken And I only had 2GB of RAM. I also have Unifi Controller on HA and when I started to compile ESPHome project, the host ran out of ram so it crashes. Right now I’ve disable Unifi Controller to free some memory and it’s stable for now

1 Like