Dashboard crashing on different browsers

I am running a dashboard that periodically examines my aircon system with its different sensors and my solar inverter to measure generation and consumption. It also pings my network on a regular basis to measure internal and external latency and finally, pings DarkSky to get weather updates. All of this data is displayed on a range of dials and charts across two rotating tabs.

The issue I'm having is that the browser regularly crashes. I was originally using Chromium on an old Pi 3 but recently upgraded to an 8Gb Pi4B. When I performed the upgrade, I did so with a fresh OS install on a brand new Sandisk Extreme A2 SD card. Unfortunately, Chromium still crashed on the new platform (after anywhere from a couple of hours to a couple of days) so I thought I'd give Vivaldi a try but the same issue there.

At the moment, I have nothing else running at all on the Pi so system resources shouldn't be an issue. The Node Red service itself is running on a Container on my QNAP NAS.

The sensors on my AC system are simple moment in time temperature displays (updated every 5 mins) whereas both the network latency and power consumption timeline graphs span a 12 hour period and are updated every minute, giving a possible 1440 readings on each chart (x 8 charts for a total of 11,520 data points)

Is this likely to be the cause of the browser crashing, not being able to handle all these data points? Or any other possible explanations?

You may wish to work out how many pixels are available for your chart(s). That will tell you how many points are viable on a chart. Unlike something like Grafana, the chart library using in Dashboard, AFAIK, does not do anything clever to manage the amount of data.

Not sure if this is the problem you are hitting but this has certainly been a known issue in the past.

Can you tell us exactly what the symptom is when it crashes?
Does node red itself keep going ok?

Chromium gives an "Ah, Snap" message on a white screen and Vivaldi has a weird icon in the middle of a dark screen.

It is indeed only the browser thats crashing, Node Red itself continues to merrily run away in the QNAP container. .

My first guess would be that it is the NAS that is having problems serving up the data, though I don't know anything about what performance you would expect from such a device. Does it have an interface where you can go in and check the processor and ram usage, for example?
What versions of node-red, the dashboard and nodejs is it running?

Thanks Colin. I previously ran the Node Red system on the Pi itself but moved it across to the QNAP to free up resources in case that was one of the causes of the crashes. When it was on the Pi, the same browser failures occured.

The QNAP container is running v0.20.8 of Node Red and 2.23.3 of Dashboard

Open a Developer Console in the browser (from the dashboard window) and watch to see if it shows any errors.

The snap messages are generally front-end not back-end.

Google seemed to suggest that it can be as a result of connection issues between browser and server, but that may not be correct, I don't know. Whatever, I think it would be worth checking the console unless anyone has a better idea.

No I agree, always check the console. I was more indicating that would be the place to start and not on the server.

Thanks all - just to check, by console you mean F12 to bring up the developer screen and then wait till the dasboard crashes? When that happens, what should I look for in the console?

Yes, as to what to look for, anything unusual.

OK, managed to capture a crash whilst in Developer mode but I have no idea what I should be looking out for. Appreciate any pointers and guidance.

Are you running the browser on the pi or using another machine to access the dashboard?

The browser is on the pi, connected to a monitor via HDMI cable. Node Red itself is running on a QNAP container on the same network, the browser on the Pi simply points to the local dashboard address.

Try running with a browser from another machine. For instance, I access NR on my pi from my mac

Can you explain what you mean by that please, it is an usual way to phrase it.

I mean it points to 192.168.xxx.xxx:1880/ui which is the address served up for dashboard access in Node Red.

Is there something I should look for in the developer panels that might give a clue to the cause of the crashes. The image I posted seems to suggest a memory error but given the same outcome has occurred across two different spec Pis with two different SD cards, I don't think the hardware is to blame.

TBH, I would take a closer look at how much data you are actually trying to send to those charts. It may be more than you think.

The clues...

  • Chrome has said "potential out-of-memory"
  • It happens suspiciously soon after a call to "getDataset"

Try connecting debug nodes to the nodes that feeds the chart - see if you can determine how much data is being piped over.

note: it might be possible to watch the network tab & refresh the browser to see how much data is being transmitted (not 100% certain as its a web socket).

Also, as @zenofmud suggested, have you tried opening the dashboard on another machine (a standard PC using Chrome for example)

PS, Regarding chart size / data points...
Unless your monitor has 1440 pixels horizontally & the charts are shown full width, you are wasting processing cycles / memory as not all points would be disaplayed.

If you are feeling adventurous then this might be interesting https://developers.google.com/web/tools/chrome-devtools/memory-problems/