Now it won't compile....?

Hi,
A few days ago, I reported that my “System Monitor Memory usage” had unexpectedly jumped and stayed excessively high?

Now, I notice that I am unable to compile anything. At first I thought that it was just the small amendment that I was trying to make. Now after trying to minimise the task, I find that I can not even compile the “test.yaml”:

esphome:
  name: testing
  friendly_name: testing

esp32:
  board: esp32dev
  framework:
    type: arduino

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "wDrheSmM4N1T9etwOUK41dxYoRflwdXzoWoncbMiB2c="

ota:
  - platform: esphome
    password: "436bf619184c7b4dd72b11ad7951ae62"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Testing Fallback Hotspot"
    password: "lDR9s7jrYjuA"

captive_portal:

It fails with these messages:

INFO ESPHome 2025.5.2
INFO Reading configuration /config/esphome/testing.yaml...
INFO Generating C++ source...
INFO Compiling app...
Processing testing (board: esp32dev; framework: arduino; platform: platformio/[email protected])
--------------------------------------------------------------------------------
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
 - toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
Dependency Graph
|-- AsyncTCP-esphome @ 2.1.4
|-- WiFi @ 2.0.0
|-- FS @ 2.0.0
|-- Update @ 2.0.0
|-- ESPAsyncWebServer-esphome @ 3.3.0
|-- DNSServer @ 2.0.0
|-- ESPmDNS @ 2.0.0
|-- noise-c @ 0.1.6
Compiling .pioenvs/testing/src/esphome/components/api/api_connection.cpp.o
Compiling .pioenvs/testing/src/esphome/components/api/api_pb2.cpp.o
Compiling .pioenvs/testing/src/esphome/components/api/api_pb2_service.cpp.o
Compiling .pioenvs/testing/src/esphome/components/api/list_entities.cpp.o
xtensa-esp32-elf-g++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
xtensa-esp32-elf-g++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
xtensa-esp32-elf-g++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
========================= [FAILED] Took 14.39 seconds =========================

For what its worth, this is the Device Builder Log:

[16:15:21] INFO: Starting ESPHome dashboard...
s6-rc: info: service init-nginx successfully started
s6-rc: info: service nginx: starting
s6-rc: info: service nginx successfully started
s6-rc: info: service discovery: starting
[16:15:21] INFO: Waiting for ESPHome dashboard to come up...
2025-06-11 16:15:27,288 INFO Starting dashboard web server on unix socket /var/run/esphome.sock and configuration dir /config/esphome...
[16:15:27] INFO: Starting NGINX...
[16:15:28] INFO: Successfully send discovery information to Home Assistant.
s6-rc: info: service discovery successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
2025-06-11 16:16:06,071 INFO 200 GET /devices (0.0.0.0) 23.21ms
2025-06-11 16:21:06,956 INFO 200 GET /devices (0.0.0.0) 122.00ms
2025-06-11 16:24:31,307 INFO 304 GET / (0.0.0.0) 85.58ms
2025-06-11 16:24:31,366 INFO 304 GET /devices (0.0.0.0) 5.93ms
2025-06-11 16:24:36,038 INFO 304 GET /info?configuration=testing.yaml (0.0.0.0) 5.38ms
2025-06-11 16:24:36,365 INFO 304 GET /devices (0.0.0.0) 5.02ms
2025-06-11 16:24:38,274 INFO 101 GET /compile (0.0.0.0) 6.63ms
2025-06-11 16:24:38,281 INFO Running command 'esphome --dashboard compile /config/esphome/testing.yaml'
2025-06-11 16:24:41,365 INFO 304 GET /devices (0.0.0.0) 5.15ms
2025-06-11 16:24:46,361 INFO 304 GET /devices (0.0.0.0) 2.78ms
2025-06-11 16:25:07,612 INFO 304 GET /devices (0.0.0.0) 387.90ms
2025-06-11 16:25:07,634 INFO 304 GET /devices (0.0.0.0) 3.40ms
2025-06-11 16:25:12,670 INFO 304 GET /devices (0.0.0.0) 7.09ms
2025-06-11 16:25:13,436 INFO Process exited with return code 1

This is my system:

* Installation methodHome Assistant OS
* Core2025.5.3
* Supervisor2025.05.3
* Operating System15.2
* Frontend20250516.0

This is a puzzle to me, as I have not been doing anything to it, It has just been “doing its thing”…

Regards, Martin

I think your hardware (not esp) is running on it’s limits.
Try to add this on your yaml:

esphome:
  compile_process_limit: 1

Have you tried restarting the integration and/or HA?

Sometimes memory just fills up or caches are troubling

Small change…

INFO ESPHome 2025.5.2
INFO Reading configuration /config/esphome/motorhome-as5600-lpg.yaml...
INFO Generating C++ source...
INFO Compiling app...
Processing motorhome-as5600-lpg (board: lolin_s2_mini; framework: arduino; platform: platformio/[email protected])
--------------------------------------------------------------------------------
HARDWARE: ESP32S2 240MHz, 320KB RAM, 4MB Flash
 - toolchain-riscv32-esp @ 8.4.0+2021r2-patch5 
 - toolchain-xtensa-esp32s2 @ 8.4.0+2021r2-patch5
Dependency Graph
|-- AsyncTCP-esphome @ 2.1.4
|-- WiFi @ 2.0.0
|-- FS @ 2.0.0
|-- Update @ 2.0.0
|-- ESPAsyncWebServer-esphome @ 3.3.0
|-- ESPmDNS @ 2.0.0
|-- Wire @ 2.0.0
|-- ArduinoJson @ 6.18.5
Compiling .pioenvs/motorhome-as5600-lpg/src/esphome/components/api/api_connection.cpp.o
xtensa-esp32s2-elf-g++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
*** [.pioenvs/motorhome-as5600-lpg/src/esphome/components/api/api_connection.cpp.o] Error 1
========================= [FAILED] Took 11.84 seconds =========================

Repeatedly… With no effect!

Stop all other add-ons and try again.

Made no difference…
Don’t know if its related but “System Monitor Memory usage” is still running at 60%?

Of course you did clean build files and rebooted the hardware?

1 Like

Yes and yes…

And what hardware is your HA system running on?

The docs generally seem to tell you to install esphome onto your HA system and while this can work, many HA installations are running on hardware that is underpowered.

Some people run esphome independently from HA, which can work well.

I installed this add-on that let’s me use older versions of ESPHome on Home Assistant.

Or

Try installing an older version of ESPHome.:

pip install esphome==<version_number>