Random 502 Bad Gateway and other errors when opening zigbee2mqtt web page

I run supervised HA in an x86 VM and everything is working fine. I’m using Z2M with a slae.sh (cc2652rb) stick, pretty good range, everything works.

But, I have hell of a time every time I try to open the Z2M web page inside HA. Sometimes it loads properly instantly and shows my devices, sometimes I need to try 10-15 times to make it load properly or load at all. Sometimes I get a blank frame, sometimes 502 Bad Gateway, sometimes plain html without CSS. Everything is working as far as devices or functionality is concerned, this is not a startup error.

This weird behavior is very similar to one I sometimes see with Nginx servers, and those times I need to increase the fastcgi buffers. There’s no Nginx involved with Z2M, but I suspect some kind of buffering issue. I can’t connect to the web page of the Z2M container directly as its port is not exported. So I’m not entirely sure if it’s a HA or a Z2M issue.

Any insight is appreciated. Maybe I need to report a bug instead?

I never see that issue, but then again, I don’t use the HA Add-on.

So, besides francisp who never used the integration, thus has no relevant info in the subject, did really no one experience similar things? I wonder if I need to dig deep in the sources of the core to see how these web admin pages/requests are proxied. Maybe the issue is there.