Bug #9677
openDashboard hangs when widget needs data from a remote host which is down
0%
Description
The pfsense dashboard will take a very long time to load (30sec to 1minute) when it contains a widget that needs data from a remote system when that remote system is not available. I suspect multiple widgets have this same issue as they presumably use the same or similar methods to retrieve remote data. I can, however, reproduce this problem at will with the UPS widget which talks to a host on the same LAN.
Steps to reproduce:
Configure dashboard with UPS widget. All working ok
Access dashboard. All good.
Shutdown host with UPS
Pfsense loses connection with UPS host
Access dashboard
Wait 75 seconds
Dashboard loads
UPS widget shows that it cannot connect to the remote server
Remove UPS widget
Clear browser caches. Close browser.
Access dashboard. All good.
If I repeat the above steps, but shutdown the UPS services on the remote host instead of shutdown the host, then the dashboard loads at normal speed
I'd suggest that the method of data retrieval for widgets should be fully asynchronous and that the success of the dashboard load should not be tied to the ability of widgets to retrieve data. The dashboard and widgets should still load but show that they cannot get data
I also have a slow dashboard when the Internet connection is down.
I suspect that this might be because one or more of the widgets relies on data about or from a host up the WAN port (possibly the gateway status widget).