I've searched and read the other messages on this topic however none are recent and there didn't seem to be any 'testing' or successful diagnostics suggested.
Most of the time NR deploys in 1 or 2 secs, but every now and then it can take up to 2 mins or more to complete a deploy. Each time this occurs I have not made any significant changes to trigger this (just really small things like an inject node change, no major code changes, no new loops). Eventually NR will just "fix" itself (can take hours) and all is normal again (1-2 sec deploys). No indication why or what happened that I can see. Then, without notice, days later the problem can just mysteriously reappear.
Following trace in the log didn't offer me any no clues. Interestingly, when my editor screen has "dimmed" to signal 'deploy' in process, I can see my nodes still processing stuff (via node.status indications). I do not (yet) have Dashboard 2 in my module set. Any ideas?
My current version set is:
HW: rpi3
Linux: 11 (bullseye)
Dashboard: v3.6.5
Node Red: v4.0.5
Node.js: v18.19.1
npm: v10.5.2
EDIT:
There are no errors when NR is running.
I have tried stopping and restarting NR (many times).
I have tried shutting down and rebooting the rpi3.
I have checked for context save to SD card issues (IE: large files) ... nothing.
I have disabled all but the most simplest of tabs (one tab active), and deployed multiple times this way, still no improvement.
.. and then NR goes back to acting normally.
On a deploy, the node-red log shows that it first stops the flows. It seems that yours takes an excessive time to reach this point.
Do you do a full deploy, or just modified flows?
Do you have any especially long-running processes, either within Node-red or external processes called from NR?
Do you have any message queues which could be stacking up large numbers of messages?
After a deploy which takes a long time finally finishes, if you make a trivial change and deploy again, is that one always normal, or again protracted?
Can you get any clues from the output of htop during a deploy?
Deploy is set to modified flows. No long processes, just 1 or 2 execs that have been there forever (no recent adds). I will check htop but not a lot of hope for clues there.
I just renamed my flow file (and backup) forcing NR to start anew. Set up a simple process with an inject node, function node (w simple code) and a debug. NR deploy is almost instant, suggesting the issue has something to do with my json file (1.3M).
Don't know if this has any involvement but what I have been working on is a flow where a function node has 2 inputs. The function node that feeds it has 2 outputs, 1 to send data and a second that sends a URL to HTTP request node. There is a 1/2s delay node ahead of the HTTP request node to ensure the data arrives ahead of the HTTP info. But this has been around for a while, I was just modifying the JS in the first function node.
EDIT: I stopped NR and restarted in safe mode. Presumably nothing is running of my json file. I made some changes and deployed, still long deploy time. I'll figure this out yet.
Q: Disabling a tab didn't seem to "remove" it from deploy action (since long deploy still occurs). How can I know I've taken a tab off the board for deploy?
The flow will wait some time for slow http requests. Not sure what the timeout period is, but it seems unlikely to be the cause unless the requests are queued up.
I have a Raspberry Pi Zero 2 on which flows.json is 732kB, 35 flows, 2200 nodes.
It has the same processor as yours but half (?) the memory, and I have noticed it's starting to get sluggish on deploy but so far no very long delays.
Maybe you are just at the limits of what the Pi 3 can handle?
In which case it could be network hangups causing the problem.
Add debug nodes before and after each http node. Give the nodes meaningful names and configure them to Output to the Console (so that the debug appears in the node red log. Then use node-red-log to show the output in a command window and see if any of the requests take a long time. In particular, when it is going slow, see what the log shows.
[Edit] Also see whether deploying Modified Nodes makes a difference, as it will not be stopping and restarting the http nodes in that case.
Well for now it has cleared up again and deploy is fast (just happened). There is however a new twist in that upon deploy completion, NR popped a window saying I have some unused configuration nodes. When I click to see what the issue is I get the search window saying "is:config is:unused" . I do not recognize this. I don't think I use the word config or configure any where in my flows. When I do the search with this it seems to show almost all my nodes.
Hmm.. More detective work to do.
[Edit] Ahh.. Not almost all my nodes, almost all my Dashboard nodes that appear in the debug window under Configuration nodes. I still don't know what to do tho.
SOLUTION DETAILS: My NR computer (project) is remote to my office. I access the Dashboard and NR editor via https using my desktop computer. It is quick and makes programming fast and simple. I also occasionally access the NR computer via remote desktop, which turned out to be the problem.
Using remote desktop, I had a web page in a text editor and was searching for text through the content of the web page. I never really looked at the web page I was searching. I (finally) came to realize that every time I typed a char into the search box, the editor immediately went of to find my text (type "a", off it goes, then type"b", off it goes looking for "ab"...). Turns out the web page was FULL of font awesome icon id's and the text editor would almost freeze the rpi3 each time I typed a char.
My "process" was to type a search ("go look for this") in the text editor search box and then immediately switch to the NR editor. Because of how I was doing this it took a bit for me to realize the issue the text editor was having with the search.
So if I had the text editor open with a search (tying up the rpi3), NR deploy was really, really long. Once I closed the text editor everything runs perfectly again.
Live and learn I guess. THANKS for the suggestions and help. jbudd, htop was helpful afterall!
Don't think I've ever done that, probably because I am from the days before desktops were invented, never mind remote ones!
I run Node-red on a Pi and access it via the browser on my laptop PC.
Other interaction with the Pi is via ssh and the command line