Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Long time to refresh supervisor on outside network #2448

Closed
Matssa56 opened this issue Jan 18, 2021 · 15 comments
Closed

Long time to refresh supervisor on outside network #2448

Matssa56 opened this issue Jan 18, 2021 · 15 comments

Comments

@Matssa56
Copy link

Matssa56 commented Jan 18, 2021

Describe the issue

Hi,
I have a huge lag when accessing the supervisor or even any supervisor addon through the android app or even chrome when I'm not on the same network as the server.

You can find my forum post here with some screenshots : https://community.home-assistant.io/t/supervisor-slow-loading-when-outside-network/248593/10

It seems like it is caused by /api/hassio/app/frontend_latest/entrypoint.6bc241a4.js that takes a lot of time to load. I made a performance test and it seems like it.

Steps to reproduce

  1. Be on an external network (4G, at work, etc...
  2. Access supervisor tab or a supervisor addon (for example adguard or zigbee2mqtt web page)

Enviroment details

RPI4 4GB RAM (using good power adapter)
128Gb SANDISK usb hard drive (boot on usb)
Debian 10 buster using docker v19.03.14 (followed https://community.home-assistant.io/t/installing-home-assistant-supervised-on-a-raspberry-pi-with-debian-10/247116)
Using duckdns + nginx
Conbee 2 attached
Addons: ADB, adguard home (disabled), duckdns, file editor, home assistant google drive backup, influxdb (disabled), mariadb, mosquitto broker, nginx, node-red (disabled), valetudo mapper, visual studio code, zibee2mqtt edge, deconz (disabled)
Core version: core-2021.1.4
Supervisor version: supervisor-2021.01.5 (chanell stable)
Speedtest server side: 19.5Mbps download, 1Mbps upload
Speedtest client side: 45Mbps download, 2Mbps upload

Supervisor logs

Not sure what logs I can give since there isn't any errors or such.

System Information

Not sure if I can use this command since I'm not on HA OS. You can find this info in the environnement details.

@Matssa56 Matssa56 added the bug label Jan 18, 2021
@Matssa56 Matssa56 changed the title Very long time to refresh supervisor on outside network Long time to refresh supervisor on outside network Jan 18, 2021
@github-actions
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Mar 19, 2021
@Matssa56
Copy link
Author

This issue is still present, even with latest version (supervisor-2021.03.6 and core-2021.3.4, still on RPI4 4Gb on Debian GNU/Linux 10 (buster) and Docker 20.10.5)

@github-actions github-actions bot removed the stale label Mar 20, 2021
@github-actions
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label May 19, 2021
@einschmidt
Copy link

Just commenting here to remove the stale label, as this issue is still present, even with latest versions:

  • supervisor-2021.04.3
  • core-2021.5.4

@github-actions github-actions bot removed the stale label May 19, 2021
@vsimanin
Copy link

vsimanin commented Jun 2, 2021

From today on I am experiencing the same problem! I am looking for a solution. Before that, 2 months from the moment of installation, everything was OK.

@vsimanin
Copy link

vsimanin commented Jun 3, 2021

I want to add an important detail. Long downloads are observed only with remote access. I am not using DDNS, instead I am emulating VLANs via the ZeroTier One integration. Logically, the system should think that I am working on a local network.

And further! If you clear the browser cache, open Supervisor or any of its addons on the local network at 192.168.1.X, then something is cached and then for some time (several days or even months) the brakes are not observed on the external network! If you clear the cache and go from outside, then there is a long load.
It is important.

PS On a local network, opening Supervisor or any add-on takes a few milliseconds.
On an external network or VLAN, it takes more than 30 seconds to open!

I have suspicions that some part of hassio is trying to access the local address 192.168.1.X when it is working on an external network or VLAN. The specified address is unavailable and the page opens on timeout without downloading the necessary information from the address 192.168.1.X

Check it out, please.

@daernsinstantfortress
Copy link

I am also seeing relatively slow performance loading the supervisor page, even on the local network, where it takes up to 5s to load the page - an anomaly in a web app that is normally extremely snappy. This started for me in the previous release (I think!) but has not changed even running the latest version (core-2021.6.3 / supervisor-2021.05.4).

Screen grab of Chrome waterfall

As a note, the affected file (entrypoint.e529ad28.js, loaded by entrypoint.js) is not being cached and is loaded over the network on every page load - 1.4MB of it. Without this network load, the page would load in approx 0.5s, rather than 5s.

@vsimanin
Copy link

@daernsinstantfortress Most likely, the lack of caching of this file is the problem.

@github-actions
Copy link

github-actions bot commented Aug 9, 2021

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@barkeeper
Copy link

I have the same problem, still, happened since the last 3-4 versions, rebooting the pi fixes it once, after that it's slow or not loading again

@meichthys
Copy link

I also still see this regularly when accessing my instance remotely through nginx reverse proxy.

@balczezzz
Copy link

balczezzz commented Sep 20, 2021

Hi, I have been having exactly the same problem since I started with HA early this year. Now I'm on fairly latest software (Supervisor 2021.8.8, OS 6.2). Local loading is very fast unlike remote access via VPN that is usually ~5 second for the supervisor and add-ons.

Seems like the same issue with the JS file not being cached.

@balczezzz
Copy link

I can confirm that after updating to 2021.9.7 the supervisor loads instantly. Looks like endpoint.*.js javascript is being cached now.

@meichthys
Copy link

I am on 2021.9.7 as well and haven't noticed any change in load times.
@balczezzz are you caching anything locally (perhaps using nginxproxymanager or something similar?)

@balczezzz
Copy link

@meichthys - I'm not caching anything. Must be the browser:

image

@github-actions github-actions bot locked and limited conversation to collaborators Oct 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants