Docker logs too slow, and makes system unresponsive

Hi,

I have HA OS installed on a RaspberryPI 4B with 2GB running from an SSD.
It’s been running for several months and I noticed that I can’t see the logs for any of the addons.

Alternatively I ssh to the system and tried doing “docker logs homeassistant”, and it takes forever to show any lines, and it shows about one line every 30sec.
Making things worse, after I do this, all of docker commands, and even some addons, take forever to respond (eg: docker ps takes 1 min).
Only after I reboot the system (which by the way also takes forever, after I do the first “docker logs”), I can get docker ps to respond quickly.

Since docker is using journald to store logs, I’m wondering if there is something wrong with journald logs. The problem is that HA OS doesn’t have journalctl to do vacuum command.
Also I wasn’t able to delete any journal files from /var/log/journal, it errors with read-only filesystem.

Has anyone else had a similar issue, or knows how to solve this problem?
Is there a way to purge the journal files?

Thanks.

It does. You aren’t ssh’ing into HAOS, you’re in a docker container. That’s how the ssh addons work.

To actually get into HAOS and use journalctl follow this guide. That’s a pretty strange problem though, journald is supposed to be set up to keep that from happening. I would make a copy of the journal to some other debian system before purging it if possible. There must be something really spamming it, should track that down.

Thanks a lot. Indeed I thought the SSH addon would give me access to HA OS, but now that I think of it, it doesn’t make sense since the add-on is running on a container.
I understand HA OS is configured to automatically roll the logs, but it seems that keeping 2GB+ is too much in my case. Maybe the problem is related with slow read speed on my SSD or something similar.
Anyway, I tried the vacuum command keeping only last 2 days and now the logs show up quickly. Let’s see if it happens again in the next days.
Thanks.

1 Like