Dashboard is constantly reloading, sometimes with error "Connection lost, reconnecting"

For over a month I’ve been facing the same issue every day. After some time (usually every 5-10 minutes or so), Home Assistant shows a popup saying “Connection lost… reconnecting”.
Sometimes it also reloads the dashboard without showing the popup.

Other times it stays stuck displaying a blank page with an animated loading icon, with chrome showing “Waiting for available socket…”
image

After reloading the page, it reloads very slowly. It can take anywhere from 1 min up to 5 mins until the charts are reloaded (I use mini-graph-chart). During that time, the graphs aren’t displayed

I have the same problem with Chrome, Firefox and Opera.

I’m using Duckdns+nginx and I keep the HA page open in Chrome on a computer. I have also tried disabling “Automatically close connection” in my profile

HA is running on Rpi4 wired ethernet with a stable connection so it’s not the network dropping

How can I troubleshoot this issue? I have no idea what is causing it

I have the same problem, hope we can find a solution…

Same. HAOS running on an Rpi4 via ethernet. Whatever connects HA to the UI must be getting screwed with somehow, because even when my dashboard is unusable, my automation are still working.

I think it might have something to do with the ZBT-1. As soon as I turn on any integrations or addons that use it, I start to get disconnections. I’ve tried both versions of the firmware, as a zigbee and matter hub both separately and together.

Is there a config mistake that could account for this behavior?