Extremely slow loading of GUI

9 May 15:42:07 - [info]

Welcome to Node-RED

9 May 15:42:07 - [info] Node-RED version: v0.20.5
9 May 15:42:07 - [info] Node.js version: v10.15.3
9 May 15:42:07 - [info] Linux 4.14.98-v7+ arm LE
9 May 15:42:09 - [info] Loading palette nodes
9 May 15:42:23 - [info] Dashboard version 2.8.0 started at /ui
9 May 15:42:25 - [info] Settings file : /home/pi/.node-red/settings.js
9 May 15:42:25 - [info] Context store : 'default' [module=memory]
9 May 15:42:25 - [info] User directory : /home/pi/.node-red
9 May 15:42:25 - [warn] Projects disabled : set editorTheme.projects.enabled=true to enable
9 May 15:42:25 - [info] Flows file : /home/pi/.node-red/flows_raspberrypi.json
9 May 15:42:25 - [error] Unable to listen on http://127.0.0.1:1880/
9 May 15:42:25 - [error] Error: port in use

Running on a (freshly upgraded) RPi 3B+ and updated node-red/Node.js.

Trying to open the Web-gui of admin/development takes a veeeery long time (>10 minutes). Max Memory is set for RPi according to the recommendations.

Opening the browser is fine, all other programs are fine and the node-red functions are running (I have temperatures doing POST to other server and it is getting updated) so it seems only the Web-gui is slow (also dashboard isn't loading).


As seen in the screen grab the resources are not exhaused...

There's a lot of different node-red processes running though so I am not sure if that is normal:

pi@raspberrypi:~ $ ps -ef | grep node
pi 317 1 59 09:16 ? 03:45:45 node-red
pi 825 317 0 09:16 ? 00:00:00 /bin/bash /usr/lib/node_modules/node-red/node_modules/@node-red/nodes/core/hardware/nrgpio out 13 0
pi 827 317 0 09:16 ? 00:00:00 /bin/bash /usr/lib/node_modules/node-red/node_modules/@node-red/nodes/core/hardware/nrgpio out 29 0
pi 828 825 0 09:16 ? 00:00:00 python -u /usr/lib/node_modules/node-red/node_modules/@node-red/nodes/core/hardware/nrgpio.py out 13 0
pi 830 317 0 09:16 ? 00:00:00 /bin/bash /usr/lib/node_modules/node-red/node_modules/@node-red/nodes/core/hardware/nrgpio out 15 0
pi 831 827 0 09:16 ? 00:00:00 python -u /usr/lib/node_modules/node-red/node_modules/@node-red/nodes/core/hardware/nrgpio.py out 29 0
pi 833 317 0 09:16 ? 00:00:00 /bin/bash /usr/lib/node_modules/node-red/node_modules/@node-red/nodes/core/hardware/nrgpio out 31 0
pi 834 830 0 09:16 ? 00:00:00 python -u /usr/lib/node_modules/node-red/node_modules/@node-red/nodes/core/hardware/nrgpio.py out 15 0
pi 836 317 0 09:16 ? 00:00:00 /bin/bash /usr/lib/node_modules/node-red/node_modules/@node-red/nodes/core/hardware/nrgpio in 40 tri 25
pi 837 833 0 09:16 ? 00:00:00 python -u /usr/lib/node_modules/node-red/node_modules/@node-red/nodes/core/hardware/nrgpio.py out 31 0
pi 839 836 0 09:16 ? 00:00:00 python -u /usr/lib/node_modules/node-red/node_modules/@node-red/nodes/core/hardware/nrgpio.py in 40 tri 25
pi 840 317 0 09:16 ? 00:00:00 /bin/bash /usr/lib/node_modules/node-red/node_modules/@node-red/nodes/core/hardware/nrgpio in 38 tri 25
pi 842 840 0 09:16 ? 00:00:00 python -u /usr/lib/node_modules/node-red/node_modules/@node-red/nodes/core/hardware/nrgpio.py in 38 tri 25
pi 843 317 0 09:16 ? 00:00:00 /bin/bash /usr/lib/node_modules/node-red/node_modules/@node-red/nodes/core/hardware/nrgpio in 36 tri 25
pi 845 843 0 09:16 ? 00:00:00 python -u /usr/lib/node_modules/node-red/node_modules/@node-red/nodes/core/hardware/nrgpio.py in 36 tri 25
pi 846 317 0 09:16 ? 00:00:00 /bin/bash /usr/lib/node_modules/node-red/node_modules/@node-red/nodes/core/hardware/nrgpio in 37 tri 25
pi 851 846 0 09:16 ? 00:00:00 python -u /usr/lib/node_modules/node-red/node_modules/@node-red/nodes/core/hardware/nrgpio.py in 37 tri 25

What can I check?

Have you checked the browsers javascript console for any error messages? Similarly the 'Network' tab will show which http requests are taking a long time.

If you use a browser from another machine to access Node-RED remotely is there any improvement?

Do you have a lot of nodes in your flow?

Can you look in /home/pi/.node-red/lib and let us know if there are lots of files under there?

Thanks for getting back to me! Much appreciated!

As for Console errors, there are none:
image

pi@raspberrypi:~/.node-red/lib $ ls -la
total 12
drwxr-xr-x 3 pi pi 4096 Feb 8 2018 .
drwxr-xr-x 4 pi pi 4096 May 7 21:01 ..
drwxr-xr-x 2 pi pi 4096 Feb 8 2018 flows

There's no files under the directory, just a "flows" directory.

There are maybe 40 something nodes in total and a few (20 maybe) UI nodes (gauges mostly)

@awasen, have you tried accessing node red from another computer as suggested? Running a browser on a pi is fairly heavy lifting.

Yes, tried from other computers, it was one of the first things that hit me... :slight_smile:
Still the same problem though...

Although normal "surfing" works fine it's responsive and running nicely. It's only the NR web-gui lagging...