# Node-RED v0.19.4 3 minute delay during startup on windows

**URL:** <https://discourse.nodered.org/t/node-red-v0-19-4-3-minute-delay-during-startup-on-windows/3798>\
**Category:** General\
**Tags:** windows\
**Created:** [8 October 2018 20:02 UTC](https://discourse.nodered.org/t/node-red-v0-19-4-3-minute-delay-during-startup-on-windows/3798 "2018-10-08T20:02:26Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lace](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/lace/32/3033_2.png) [@Lace](https://discourse.nodered.org/u/Lace)\
**Post date:** [8 October 2018 20:02 UTC](https://discourse.nodered.org/t/node-red-v0-19-4-3-minute-delay-during-startup-on-windows/3798/1 "2018-10-08T20:02:26Z")

</div>

On windows I experience long startup delays of up to 3 minutes between Node-RED start and "Loading palette nodes" log message.

# Welcome to Node-RED

8 Oct. 16:07:02 - [info] Node-RED version v0.19.4  
8 Oct. 16:07:02 - [info] Node.js version: v8.11.4  
8 Oct. 16:07:02 - [info] Windows\_NT 6.1.7601 x64 LE

8 Oct. 16:10:11 - [info] Loading palette nodes  
....

My setup: Node-RED user independent install to c:\ProgramData\npmglobal and c:\ProgramData.node-red  
Startup via PM2-windows-service, but delay also accurs if Node-RED ist started manually on CLI

Any suggestions?

Lace

---

<div class="post-metadata">

**Author:** ![hotNipi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hotnipi/32/383_2.png) [@hotNipi](https://discourse.nodered.org/u/hotNipi)\
**Post date:** [8 October 2018 20:47 UTC](https://discourse.nodered.org/t/node-red-v0-19-4-3-minute-delay-during-startup-on-windows/3798/2 "2018-10-08T20:47:08Z")

</div>

I have same experiences with one of my PC-s. Tried to find reasons but no luck for now. Sometimes the startup time is even more than minute. And that machine is much more powerfull than my others. I guess the corporate security settings might have some affections but that sort of things are unreachable for me in all means. So I accepted that slow start on that PC as others behave well enought.

---

<div class="post-metadata">

**Author:** ![Lace](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/lace/32/3033_2.png) [@Lace](https://discourse.nodered.org/u/Lace)\
**Post date:** [8 October 2018 21:16 UTC](https://discourse.nodered.org/t/node-red-v0-19-4-3-minute-delay-during-startup-on-windows/3798/3 "2018-10-08T21:16:51Z")

</div>

There must be a way to debug on which task Node-RED hangs

---

<div class="post-metadata">

**Author:** ![JayDickson](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jaydickson/32/90592_2.png) [@JayDickson](https://discourse.nodered.org/u/JayDickson)\
**Post date:** [8 October 2018 23:28 UTC](https://discourse.nodered.org/t/node-red-v0-19-4-3-minute-delay-during-startup-on-windows/3798/4 "2018-10-08T23:28:47Z")

</div>

in services.msc do node-red or pm2 show as "delayed start?"

---

<div class="post-metadata">

**Author:** ![Andrei](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andrei/32/10446_2.png) [@Andrei](https://discourse.nodered.org/u/Andrei)\
**Post date:** [9 October 2018 01:03 UTC](https://discourse.nodered.org/t/node-red-v0-19-4-3-minute-delay-during-startup-on-windows/3798/5 "2018-10-09T01:03:30Z")

</div>

Just for your reference, for me it takes 14 seconds between start and "Loading pallete nodes", in a fresh start.

# Welcome to Node-RED

8 Oct 21:58:32 - [info] Node-RED version: v0.19.1  
8 Oct 21:58:32 - [info] Node.js version: v8.11.1  
8 Oct 21:58:32 - [info] Windows\_NT 10.0.17134 x64 LE  
8 Oct 21:58:46 - [info] Loading palette nodes

After a restart it is even faster, only 5 seconds:

8 Oct 22:05:24 - [info] Node-RED version: v0.19.1  
8 Oct 22:05:24 - [info] Node.js version: v8.11.1  
8 Oct 22:05:24 - [info] Windows\_NT 10.0.17134 x64 LE  
8 Oct 22:05:25 - [trace] git init: {"version":"2.16.1.windows.1","user":{""}}  
8 Oct 22:05:29 - [info] Loading palette nodes

---

<div class="post-metadata">

**Author:** ![craigcurtin](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@craigcurtin](https://discourse.nodered.org/u/craigcurtin)\
**Post date:** [9 October 2018 02:10 UTC](https://discourse.nodered.org/t/node-red-v0-19-4-3-minute-delay-during-startup-on-windows/3798/6 "2018-10-09T02:10:05Z")

</div>

Here you go - not sure how technical you are

Stop Node-red from running through PM2

Run this [https://docs.microsoft.com/en-us/sysinternals/downloads/procmon](https://docs.microsoft.com/en-us/sysinternals/downloads/procmon)

then fire up Node-red and try to isolate down where it is spending all of its time.

In particular you will be able to filter out other extraneous processes and just drill down into the NR processes to see where the delays are

Craig

---

<div class="post-metadata">

**Author:** ![hotNipi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hotnipi/32/383_2.png) [@hotNipi](https://discourse.nodered.org/u/hotNipi)\
**Post date:** [9 October 2018 08:12 UTC](https://discourse.nodered.org/t/node-red-v0-19-4-3-minute-delay-during-startup-on-windows/3798/8 "2018-10-09T08:12:33Z")

</div>

With Process Monitor I found:  
`C:\Users\{username}\AppData\Roaming\npm\node_modules\node-red\node_modules\proxy-addr\node_modules` gets result `NAME NOT FOUND`

Running Node-RED behind corporate proxy. Tried to fix with help of goolge but no luck yet.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [9 October 2018 08:17 UTC](https://discourse.nodered.org/t/node-red-v0-19-4-3-minute-delay-during-startup-on-windows/3798/9 "2018-10-09T08:17:59Z")

</div>

Startup times should be less than that of an equivalent setup on a Pi of course - unless you have a lot of other things going on.

Obvious place to start is to monitor disk and CPU activity during startup. I've had a PC in the past with a hybrid hdd/sdd that insisted on pausing every now and again due to a badly concocted disk interface.

Next place I'd look is at any node that relies on the network. Long pauses are often due to TCP timeouts so check if a node is looking for a network resource when it starts up. This might well account for different startup times in different locations - e.g. home vs corporate network.

If general monitoring can't help. Try using a NodeJS debugging monitor. The VScode editor can be configured to do detailed debugging of NodeJS apps and I've written about that previously.

My own PC is used for development and only takes a few seconds to start. I typically don't have a lot of big flows but even when I have, it doesn't take long to start.

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [9 October 2018 14:39 UTC](https://discourse.nodered.org/t/node-red-v0-19-4-3-minute-delay-during-startup-on-windows/3798/10 "2018-10-09T14:39:39Z")

</div>

This is a delay before Node-RED has loaded the flows - so won't be related to anything your flow is doing.

```
8 Oct 21:58:32 - [info] Windows_NT 10.0.17134 x64 LE
8 Oct 21:58:46 - [info] Loading palette nodes

```

The main activity Node-RED is doing between these two log statements is scanning the file system for node-red nodes to load - so is heavily dependent on disk access.

I'm slightly surprised it would take 3 minutes ... that's the sort of speed we'd get on an original Pi with slow SD Card access.

---

<div class="post-metadata">

**Author:** ![Vickylatruite](https://avatars.discourse-cdn.com/v4/letter/v/5f9b8f/32.png) [@Vickylatruite](https://discourse.nodered.org/u/Vickylatruite)\
**Post date:** [10 October 2018 08:37 UTC](https://discourse.nodered.org/t/node-red-v0-19-4-3-minute-delay-during-startup-on-windows/3798/11 "2018-10-10T08:37:24Z")

</div>

Hey, I experienced a similar issue on some computers in my former company. I'm not sure this is the same reason, but I think i should share my experience just in case...

I found out that the launcher hung in a loop that is in a script located at `C:\Program Files\nodejs\npm.cmd`

```
:: Created by npm, please don't edit manually.
@ECHO OFF

SETLOCAL

SET "NODE_EXE=%~dp0\node.exe"
IF NOT EXIST "%NODE_EXE%" (
  SET "NODE_EXE=node"
)

SET "NPM_CLI_JS=%~dp0\node_modules\npm\bin\npm-cli.js"
FOR /F "delims=" %%F IN ('CALL "%NODE_EXE%" "%NPM_CLI_JS%" prefix -g') DO (
  SET "NPM_PREFIX_NPM_CLI_JS=%%F\node_modules\npm\bin\npm-cli.js"
)
IF EXIST "%NPM_PREFIX_NPM_CLI_JS%" (
  SET "NPM_CLI_JS=%NPM_PREFIX_NPM_CLI_JS%"
)

"%NODE_EXE%" "%NPM_CLI_JS%" %*

```

I didn't dig deeper into the issue, so I don't have any real fix, but a workaround : I removed the loop and it just worked in my case.

```
:: Created by npm, please don't edit manually.
@ECHO OFF

SETLOCAL

SET "NODE_EXE=%~dp0\node.exe"
IF NOT EXIST "%NODE_EXE%" (
  SET "NODE_EXE=node"
)

SET "NPM_CLI_JS=%~dp0\node_modules\npm\bin\npm-cli.js"

"%NODE_EXE%" "%NPM_CLI_JS%" %*
```

---

<div class="post-metadata">

**Author:** ![KarnanKurup](https://avatars.discourse-cdn.com/v4/letter/k/e480ec/32.png) [@KarnanKurup](https://discourse.nodered.org/u/KarnanKurup)\
**Post date:** [11 February 2019 13:01 UTC](https://discourse.nodered.org/t/node-red-v0-19-4-3-minute-delay-during-startup-on-windows/3798/12 "2019-02-11T13:01:58Z")

</div>

I faced the same problem when the node-red run in a proxy network. while starting node-red NodeJs check for update information and this TCP communication is getting blocked.  
As a workaround we can comment 'updateNotifier.checkNpm()' method calling part in the "C:\Program Files\nodejs\node\_modules\npm\node\_modules\update-notifier\check.js" file

---

<div class="post-metadata">

**Author:** ![hotNipi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hotnipi/32/383_2.png) [@hotNipi](https://discourse.nodered.org/u/hotNipi)\
**Post date:** [11 February 2019 19:38 UTC](https://discourse.nodered.org/t/node-red-v0-19-4-3-minute-delay-during-startup-on-windows/3798/13 "2019-02-11T19:38:08Z")

</div>

Here's what's going on behind the scenes: [https://npm.community/t/npm-version-takes-3-minutes-to-complete-when-run-in-child-process-and-behind-corporate-proxy/1658](https://npm.community/t/npm-version-takes-3-minutes-to-complete-when-run-in-child-process-and-behind-corporate-proxy/1658)

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [11 February 2019 22:55 UTC](https://discourse.nodered.org/t/node-red-v0-19-4-3-minute-delay-during-startup-on-windows/3798/14 "2019-02-11T22:55:47Z")

</div>

I've see this annoying 3m start up delay of node-red on windows 7, 10, 2012, 2016. Gonna try what @KarnanKurup suggested tomorrow.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [12 February 2019 09:04 UTC](https://discourse.nodered.org/t/node-red-v0-19-4-3-minute-delay-during-startup-on-windows/3798/15 "2019-02-12T09:04:30Z")

</div>

Finally - node-red startup 3 minutes faster!

For anyone behind a proxy having a 3 minute delay starting node-red...

- Using notepad/text editor, open `node-red.cmd` (look in you NPM Global folder)
- Add the following line to the top of the file (before any other command)  
`SET NO_UPDATE_NOTIFIER=1`
- Start node-red using the cmd file  
`node-red.cmd`
- Enjoy the extra 3 mins 🙂

Thanks to @hotNipi, @KarnanKurup for pointing me in the right direction .

---

<div class="post-metadata">

**Author:** ![mannharleen](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mannharleen/32/25594_2.png) [@mannharleen](https://discourse.nodered.org/u/mannharleen)\
**Post date:** [19 September 2019 05:09 UTC](https://discourse.nodered.org/t/node-red-v0-19-4-3-minute-delay-during-startup-on-windows/3798/16 "2019-09-19T05:09:54Z")

</div>

works even for v0.20.7

---

<div class="post-metadata">

**Author:** ![minhhn0205](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/minhhn0205/32/29062_2.png) [@minhhn0205](https://discourse.nodered.org/u/minhhn0205)\
**Post date:** [29 June 2021 07:31 UTC](https://discourse.nodered.org/t/node-red-v0-19-4-3-minute-delay-during-startup-on-windows/3798/17 "2021-06-29T07:31:28Z")

</div>

Can I enjoy 3 more minutes if I start Node-RED in the following way?

```auto
node --max-old-space-size=8192 C:\Users\admin\AppData\Roaming\npm\node_modules\node-red\red.js

```

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [29 June 2021 07:45 UTC](https://discourse.nodered.org/t/node-red-v0-19-4-3-minute-delay-during-startup-on-windows/3798/18 "2021-06-29T07:45:36Z")

</div>

Yes - if you `SET NO_UPDATE_NOTIFIER=1` environment variable in the terminal before running `node .....`

alternatively add `NO_UPDATE_NOTIFIER=1` to global environment variables

alternatively, make your own batch file `node-red-spacesize8192.cmd` with the text...

```bash
SET NO_UPDATE_NOTIFIER=1
node --max-old-space-size=8192 C:\Users\admin\AppData\Roaming\npm\node_modules\node-red\red.js

```

---

<div class="post-metadata">

**Author:** ![minhhn0205](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/minhhn0205/32/29062_2.png) [@minhhn0205](https://discourse.nodered.org/u/minhhn0205)\
**Post date:** [29 June 2021 08:13 UTC](https://discourse.nodered.org/t/node-red-v0-19-4-3-minute-delay-during-startup-on-windows/3798/19 "2021-06-29T08:13:19Z")

</div>

Thank you for your kind guidance!
