Some time after updating my installation around may 2021, I noticed a problem with Logs timing out. I’ve looked at many different things (including switching to the NginX Proxy Manager Add-On) but today I found a resolution while researching how to wipe it and restore everything from scratch.
Problem:
Supervisor logs take over 30s to load. Sometime an NginX Gateway timeout error is seen.
Add-On logs take longer than 30s to load and occasionally show the same NginX Gateway error.
The fix:
using root SSH,
ssh root@YOUR-HOST-IP-HERE -p 22222
*instructions here *
I discovered the systemd journal files were 3.1Gb in total. Reducing these have dramatically improved Add-On Log page load times:
Check sizes:-
'$ journalctl --disk-usage
Archived and active journals take up 3.1G in the file system.’
To remove old journal files:
journalctl --rotate
journalctl --vacuum-time=2weeks
And now:
'# journalctl --disk-usage
Archived and active journals take up 368.0M in the file system.’
Supervisor logs load in under 1s now as do all my Add-On logs.
Happy Techy.
Notes:
I have a RPI4 with 2Gb ram, and SD card boot to a 120Gb SSD data partition. Disk space has never been a problem, and nor has SD card wear. It’s running Home Assistant OS 6.1 with Home Assistant 2021.7.1