# Slow... (Everything)

**URL:** <https://discourse.nodered.org/t/slow-everything/30808>\
**Category:** General\
**Created:** [28 July 2020 02:26 UTC](https://discourse.nodered.org/t/slow-everything/30808 "2020-07-28T02:26:35Z")\
**Posts on this page:** 11\
**Page:** 2

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [28 July 2020 22:40 UTC](https://discourse.nodered.org/t/slow-everything/30808/21 "2020-07-28T22:40:31Z")

</div>

It feels like its something not closing down/cleaning up properly, so it adds another instance on each deploy. Do you also have any extra (3rd party) nodes in the flow? Especially ones that may make network connections ?

---

<div class="post-metadata">

**Author:** ![SteveMann](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/stevemann/32/3810_2.png) [@SteveMann](https://discourse.nodered.org/u/SteveMann)\
**Post date:** [29 July 2020 02:29 UTC](https://discourse.nodered.org/t/slow-everything/30808/22 "2020-07-29T02:29:53Z")

</div>

There's nothing outside of the basic nodes, no I/O except for MQTT nodes.

---

<div class="post-metadata">

**Author:** ![SteveMann](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/stevemann/32/3810_2.png) [@SteveMann](https://discourse.nodered.org/u/SteveMann)\
**Post date:** [29 July 2020 02:41 UTC](https://discourse.nodered.org/t/slow-everything/30808/23 "2020-07-29T02:41:55Z")

</div>

> [@Colin](#):
>
> Could you start node-red in a terminal and post the terminal output please.

All you might see is an ancient version of Node-Red.

```auto
$ node-red
28 Jul 22:39:31 - [info]

Welcome to Node-RED
===================

28 Jul 22:39:31 - [info] Node-RED version: v0.17.5
28 Jul 22:39:31 - [info] Node.js version: v6.17.1
28 Jul 22:39:31 - [info] Linux 4.9.35-v7+ arm LE
28 Jul 22:39:34 - [info] Loading palette nodes
28 Jul 22:39:58 - [info] Dashboard version 2.6.2 started at /ui 28 Jul 22:40:09 - [warn] ------------------------------------------------------
28 Jul 22:40:09 - [warn] [server] SyntaxError: Unexpected identifier
28 Jul 22:40:09 - [warn] [server-events] SyntaxError: Unexpected identifier
28 Jul 22:40:09 - [warn] [server-state-changed] SyntaxError: Unexpected identifier
28 Jul 22:40:09 - [warn] [trigger-state] SyntaxError: Unexpected identifier
28 Jul 22:40:09 - [warn] [poll-state] SyntaxError: Unexpected identifier
28 Jul 22:40:09 - [warn] [api-call-service] SyntaxError: Unexpected identifier (line:2)
28 Jul 22:40:09 - [warn] [api-current-state] SyntaxError: Unexpected identifier (line:1)
28 Jul 22:40:09 - [warn] [api-get-history] SyntaxError: Unexpected identifier (line:2)
28 Jul 22:40:09 - [warn] [api-render-template] SyntaxError: Unexpected identifier (line:2)
28 Jul 22:40:09 - [warn] ------------------------------------------------------
28 Jul 22:40:09 - [info] Settings file : /home/pi/.node-red/settings.js
28 Jul 22:40:09 - [info] User directory : /home/pi/.node-red
28 Jul 22:40:09 - [info] Flows file : /home/pi/.node-red/flows_Marvin.json
28 Jul 22:40:11 - [warn] Communication server error: Error: listen EADDRINUSE 0.0.0.0:1880
28 Jul 22:40:11 - [error] Unable to listen on http://127.0.0.1:1880/
28 Jul 22:40:11 - [error] Error: port in use

```

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [29 July 2020 05:44 UTC](https://discourse.nodered.org/t/slow-everything/30808/24 "2020-07-29T05:44:39Z")

</div>

Well, that report doesn't look good.

The **server state changed** to me is of concern. If it is changing the state of the _server_ that is work. Work is time. Time is being lost in/on this flow.

Also the **api-call-service** SyntaxError.

Can you identify _who_ these nodes are?

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [29 July 2020 08:04 UTC](https://discourse.nodered.org/t/slow-everything/30808/25 "2020-07-29T08:04:06Z")

</div>

> [@SteveMann](#):
>
> All you might see is an ancient version of Node-Red.

Also an ancient and unsupported version of nodejs. Is there a reason you don't use the upgrade script from the node red docs to bring it all up to date?

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [29 July 2020 12:23 UTC](https://discourse.nodered.org/t/slow-everything/30808/26 "2020-07-29T12:23:48Z")

</div>

well most of those error messages are not from core nodes - so indeed there are other nodes in play - and as @Trying_to_learn suggests they may well be trying to make connections in the background and clogging everything up... Just because the node isn't in the flow doesn't mean that it isn't loaded into the system. Nodes should be well behaved about this - but obviously some aren't. If you aren't using them - completely uninstall them.

---

<div class="post-metadata">

**Author:** ![SteveMann](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/stevemann/32/3810_2.png) [@SteveMann](https://discourse.nodered.org/u/SteveMann)\
**Post date:** [29 July 2020 12:36 UTC](https://discourse.nodered.org/t/slow-everything/30808/27 "2020-07-29T12:36:46Z")

</div>

> [@Colin](#):
>
> > [@SteveMann](#):
> >
> > All you might see is an ancient version of Node-Red.
> 
> Also an ancient and unsupported version of nodejs. Is there a reason you don't use the upgrade script from the node red docs to bring it all up to date?

Because every time I upgrade Node-Red, stuff breaks. This particular project will be moot at the end of this week and I'll risk it then. The risk should be lower, though, because I have been moving my flows to an Intel Nuc which does have the latest version of Node-Red and nodejs.

This is also one of the reasons I suggested that this discussion should pause. I was mostly looking to see if someone else was seeing the same issue.

---

<div class="post-metadata">

**Author:** ![SteveMann](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/stevemann/32/3810_2.png) [@SteveMann](https://discourse.nodered.org/u/SteveMann)\
**Post date:** [29 July 2020 13:17 UTC](https://discourse.nodered.org/t/slow-everything/30808/28 "2020-07-29T13:17:21Z")

</div>

> [@dceejay](#):
>
> well most of those error messages are not from core nodes - so indeed there are other nodes in play - and as @Trying_to_learn suggests they may well be trying to make connections in the background and clogging everything up... Just because the node isn't in the flow doesn't mean that it isn't loaded into the system. Nodes should be well behaved about this - but obviously some aren't. If you aren't using them - completely uninstall them.

I have another Node-Red server on an Intel Nuc, but only one broker, on the Pi3 that is also running this flow where I am seeing the problem.

I ran _top_ and _sudo journalctl -n 30 -u nodered -o cat_ on two terminal windows and made an interesting observation.

When the %CPU for Node-Red went up, I was seeing a lot of this error on journalctl:  
`Failed to GET info from http://172.17.0.1:44221/upnp/amazon-ha-bridge/setup.xml`

But the %CPU for mosquitto didn't go up.

SO- is it possible that I don't have a Node-Red problem at all, but a misbehaving Alexa device? Why this would cause the Node-Red %CPU to go over 100% is a mystery to be solved later.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [29 July 2020 15:36 UTC](https://discourse.nodered.org/t/slow-everything/30808/29 "2020-07-29T15:36:21Z")

</div>

do you have an alexa node in the palette - but (supposedly) not used ?  
though if something else is chewing/leaking memory then at some point it will force node-red to have to page memory to "disk" which will then get slow...

---

<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:** [29 July 2020 16:20 UTC](https://discourse.nodered.org/t/slow-everything/30808/30 "2020-07-29T16:20:27Z")

</div>

> [@SteveMann](#):
>
> SO- is it possible that I don't have a Node-Red problem at all, but a misbehaving Alexa device? Why this would cause the Node-Red %CPU to go over 100% is a mystery to be solved later.

Yup! If not Alexa then something similar. As Dave has already said, this is a problem with something not closing down correctly. It very likely doesn't therefore release a network connection which causes you problems as it tries to reconnect. Getting slowly worse and worse.

Dave also mentions paging and this can cause high CPU on a Pi thanks to the way the SD-Card interface is handled, it wouldn't generally cause high CPU on something with a proper disk interface.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [27 September 2020 16:20 UTC](https://discourse.nodered.org/t/slow-everything/30808/31 "2020-09-27T16:20:30Z")

</div>

Closed on 27 September 2020 16:20 UTC

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

[Previous page](https://discourse.nodered.org/t/slow-everything/30808.md?page=1)
