HA hosed when trying to upload wirelessly to ESP

I’ve noticed over the last week about 80% of the time when trying to upload wirelessy to an ESPhome device, HA becomes unavailable and the web ui looses connection.

Raspberry PI 3B+ running HA
ESP-12E

System Health

version: core-2021.11.1
installation_type: Home Assistant OS
dev: false
hassio: true
docker: true
user: root
virtualenv: false
python_version: 3.9.7
os_name: Linux
os_version: 5.10.17-v8
arch: aarch64
timezone: America/Indiana/Indianapolis

logged_in: true
subscription_expiration: December 2, 2021, 7:00 PM
relayer_connected: true
remote_enabled: true
remote_connected: true
alexa_enabled: true
google_enabled: true
remote_server: us-east-1-2.ui.nabu.casa
can_reach_cert_server: ok
can_reach_cloud_auth: ok
can_reach_cloud: ok

host_os: Home Assistant OS 6.6
update_channel: stable
supervisor_version: supervisor-2021.10.8
docker_version: 20.10.8
disk_total: 27.6 GB
disk_used: 6.6 GB
healthy: true
supported: true
board: rpi3-64
supervisor_api: ok
version_api: ok
installed_addons: CEC Scanner (3.0), ESPHome (2021.11.1), Z-Wave JS (0.1.47), Home Panel (2.3.0), Plex Media Server (2.6.3), File editor (5.3.3)

dashboards: 2
resources: 0
views: 4
mode: storage

api_endpoint_reachable: ok

A Raspberry PI 3B+ has a hard time compiling ESPHome code. Try to increase your swap size.

Is this swap file increase for raspberry pi hardware running HA?

It is for HA OS.

I moved HA to a virtualbox vm and it flies through things that the rasp pi 3 was struggling with including my original post.