I just moved my HAOS from an RPi4 to a VM on an 8 core Lenovo. Initially it only had 2 cores allocated to HAOS and the ESPHome compiles were fine, but slow. So I cranked up the cores on the VM and started getting compiler crashes. This param “fixed” it. Thanks!
A complex ESPhome project started to fail compilation even with the single core limit, so it was easier to upgrade from a Yellow CM4 2Gb RAM to a CM5 8Gb RAM than track down the root cause.
Most of the time the CM5 sits at 1.6 GB / 8 GB used, but the cost difference between a 4Gb and 8Gb RAM model was less than the cost of my time to upgrade the Yellow in the future (took longer to drill cooling holes than fit the module, official heatsink, than restore to NVMe).
Cranking the core limit to 4 CPUs (the max ISTR) does bring compile times down a lot, and the RAM is probably also caching lots.
A CM5 8Gb still feels like a bad engineering solution, but hey, overkill can be fun!
I am having this same issue on an install that is in an unraid VM with 12gb of memory available. I don’t have a full grasp of how the esphome builder works inside HA.
Even performing a simple empty install fails as of version: 2025.5.2
I am really not sure how to attack this.
Start with providing logs that show the exact problem you are having (which might or might not be related to the few slightly different problems that have been reported in this thread of many posts).
Some people like the convenience of having everything in one place. I prefer installing esphome on a different machine: Installing ESPHome Manually — ESPHome
I use pipx, since I think it does a decent job of isolating things. Once you have Python installed it is as easy as
pip install pipx
pipx install esphome
Wow, thank you very much man. This issue has been frustrating me for so long, that i ended giving up, but now after a year i wanted to try again after reading this method.
It solved the issue for my Raspberry Pie 3B+ !
The RPI simply dont have enough muscles for this task, even when i disabled all other add-ons.
Thank you so much!
This comment was really helpful. I know enough to set that compile_process_limit on my own files, but I’m trying a new file that pulls files from github and it sounds like those files would need it too. So I guess I’m forking my own to set it there (or I could limit the HA VM to 2 cores - which will be plan B if this doesn’t work.)