Home Assistant logs timing-out

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:

see here for details

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. :smiley:

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

3 Likes

Thanks - was having this issue and this solved it!

I had the same issue and this solution worked… for a couple of days. Is there any way to permanently solve the journalctl from clogging up?

I didn’t get a response from the HA team about this, although I admit I didn’t ask that question specifically.
However, I can report that recently, I reinstalled HA onto another RPI4 and restored my backups onto it and I haven’t had to do this kind of maintenance now I come to think of it.

1 Like

Thanks for your suggestion!
Even on the latest and greatest HASSOS and HA this issue is still present.
There were 3.3G in logs that were hard to load.
Your recommendations have fixed the problem, at least for now.
I will report it on GitHub so it can be fixed if recognized as an issue.
Thanks