Dashboard Slow on Pi Running Node-Red, But Fine on Other Devices

I have a very basic dashboard that shows two tables (refreshed once per second, populated from a MySQL query) and some other information that is refreshed every 5 minutes. The Pi running NR, Pi 4 with 8GB RAM and a 128GB SD card, also runs a web browser to display the dashboard. It's been running fine for about 2 years but now I'm having a problem.

The dashboard will say "Connection Lost" and then refresh the page. This is happening quite frequently. If it's not doing that, the page is very slow to update. Everything runs perfectly on other devices viewing the dashboard through their own web browsers. I've rebooted the Pi, restarted the web browser, and tried other web browsers besides Chromium. Top shows chromium being its usual resource hog, but nothing out of the ordinary or too much consider what the Pi 4 has.

I'm not sure what else to check. I'm about ready to deploy a separate Pi for displaying the dashboard on our monitors.

top - 15:22:56 up 1 day, 23:57,  3 users,  load average: 2.24, 2.00, 2.02
Tasks: 293 total,   2 running, 291 sleeping,   0 stopped,   0 zombie
%Cpu(s): 43.3 us,  6.1 sy,  0.0 ni, 49.2 id,  0.3 wa,  0.0 hi,  1.2 si,  0.0 st
MiB Mem :   7812.3 total,   4945.6 free,   1097.9 used,   1768.8 buff/cache
MiB Swap:    100.0 total,    100.0 free,      0.0 used.   6454.8 avail Mem

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
19667 user      20   0  845024 399280 104200 R 104.3   5.0  22:44.73 chromium-browse
 3016 user      20   0  467752 357228  37280 S  60.5   4.5   1901:13 node-red
  777 mysql     20   0  641292  99264  18476 S   9.9   1.2 262:03.14 mariadbd
19645 user      20   0  523580 106800  83784 S   6.9   1.3   1:54.73 chromium-browse
19592 user      20   0  592424 181548 145188 S   5.9   2.3   1:42.70 chromium-browse
19646 user      20   0  329528  75916  68404 S   4.6   0.9   1:13.44 chromium-browse

One thread down had the same issue

Why a separate pi, why not a laptop, pc,mac or even a tablet and many more devices.

How many rows are you pushing to the dashboard?

Do you have charts? And if so, what is the the data size / history size of data/charts?

1 Like

A desktop Windows PC will probably be what I end up doing. I have a bag of Pis, too, which is why I was going to go that direction. The Pi feeds an HDMI distribution unit that feeds a number of TVs throughout our building. It's gives us the current status of most of our rides and alerts us instantly when a ride goes down, so the fact that it was lagging up to a minute at times was concerning. LOL

1 Like

No charts. It's just two tables. One has 20 rows and the other has... Well now! It just hit me that I had a scroll bar on the second table. I forgot to limit the number of results to 4 so it was processing everything in our occurrence list. I added LIMIT to my query and it seems to be running much better now. Thanks! :rofl:

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.