Yep, that looks very much like the Pi isn’t happy about the load and kills the process. Try again to compile and take a close look at CPU and RAM load. You’ll likely see 100% load and after a while, the process gets killed and the load falls back to normal.
That was the reason why I changed from Pi3 to Pi4 and ultimately to a small home server. ESPHome is quite heavy an your CPU load. Not long, but enough to kill a not very potent setup.
As an alternative you can install ESPHome on your normal PC or laptop, and use that one to compile the firmware. Afterwards you download it and flash it OTA via your standard ESPHome add-on from HA.
It is still possible to compile on RPI3 if you increase the swap file size. 2GB should do the trick. I had to do it for RPI3B+ that would usually crash HA when I tried to compile in esphome. How to increase swap file size
Thanks for the information. I’ve marked it as the solution since others will likely have the same issue.
In my case, I was troubleshooting an ESPHome WiFi problem and wanted a “disposable” installation. Basically, a device compiled on ESPHome2024.4 will not connect to the WiFi, while the same device and configuration file compiled on ESPHome 2024.3 does connect.
My HomeAssistant host is an Intel NUC i3 with a 500Gb SSD. Since I found a way to have older versions of the ESPHome Add-On installed, I am able to continue my troubleshooting there.