# Can someone help me with this "problem"

**URL:** <https://discourse.nodered.org/t/can-someone-help-me-with-this-problem/19455>\
**Category:** General\
**Created:** [22 December 2019 08:14 UTC](https://discourse.nodered.org/t/can-someone-help-me-with-this-problem/19455 "2019-12-22T08:14:53Z")\
**Posts on this page:** 10\
**Page:** 2

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [22 December 2019 11:51 UTC](https://discourse.nodered.org/t/can-someone-help-me-with-this-problem/19455/22 "2019-12-22T11:51:04Z")

</div>

> Something in your flow is clobbering the processor.

Is it node-red ? What else is running on this pi ? I see vnc, lxpanel (full desktop) ?

---

<div class="post-metadata">

**Author:** ![afelix](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/afelix/32/9743_2.png) [@afelix](https://discourse.nodered.org/u/afelix)\
**Post date:** [22 December 2019 12:48 UTC](https://discourse.nodered.org/t/can-someone-help-me-with-this-problem/19455/23 "2019-12-22T12:48:11Z")

</div>

Something else from your first screenshot  
 ![Screenshot 2019-12-22 at 13.39.53](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/5/5fd6500b14d41209bcf6115f3dba3b35cc49a11e.png)  
The system load average is something mentioned in an earlier topic too. Since this is a pi, a load average of `4.00` means your pi is having a 100% cpu load for everything together. Anything beyond that 4.00 will slow all systems down, though at reaching 4.00 you will already notice some of that slowdown. With those 3 values, it tells you that for at least the last 15 minutes the average load has been more than 100%, so something is running on the pi hogging all system resources.

Looking at the load average is often a quick way to see how the system has been behaving for the last bit.

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [22 December 2019 13:14 UTC](https://discourse.nodered.org/t/can-someone-help-me-with-this-problem/19455/24 "2019-12-22T13:14:53Z")

</div>

> Since this is a pi, a load average of `4.00` means your pi is having a 100% cpu load for everything together.

To elaborate a bit more: 0.00 to 1.00 max per cpu core, pi has 4 cores = max 4.00

It is a busy pi for sure 😉

---

<div class="post-metadata">

**Author:** ![afelix](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/afelix/32/9743_2.png) [@afelix](https://discourse.nodered.org/u/afelix)\
**Post date:** [22 December 2019 14:00 UTC](https://discourse.nodered.org/t/can-someone-help-me-with-this-problem/19455/25 "2019-12-22T14:00:59Z")

</div>

Oh certainly, which I all explained in an earlier topic 🙂  
For reference, start here and keep reading downwards: [CPU load giving funny output from machine](https://discourse.nodered.org/t/cpu-load-giving-funny-output-from-machine/16124/2)

---

<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:** [22 December 2019 22:15 UTC](https://discourse.nodered.org/t/can-someone-help-me-with-this-problem/19455/26 "2019-12-22T22:15:40Z")

</div>

> [@afelix](#):
>
> For reference, start here and keep reading downwards:

Hmmm... Yeah. And because I can't get information from that I am still stuck.

The problem kind of resolved itself. Hard to fix something which isn't happening.

Reading through other stuff I have since been shown:

[swappie](https://help.ubuntu.com/community/SwapFaq#What_is_swappiness_and_how_do_I_change_it.3F)

I ran the command and got back the default 60.

I upped it to 80 and rebooted.

No visible change. ☹

But! (Some good news)

This is what `top` gives me now: (Cropped)

 ![Screenshot from 2019-12-23 09-11-27](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/2/25a49f2fea3ef921782cc958342a74862d87325c.png)

Not perfect, but better.

---

<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:** [22 December 2019 22:24 UTC](https://discourse.nodered.org/t/can-someone-help-me-with-this-problem/19455/27 "2019-12-22T22:24:04Z")

</div>

> [@cymplecy](#):
>
> sudo pkill -f apache2

(Sorry - I missed that reply.)

Did it/ tried it. Alas no change.

---

<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:** [22 December 2019 22:38 UTC](https://discourse.nodered.org/t/can-someone-help-me-with-this-problem/19455/28 "2019-12-22T22:38:43Z")

</div>

Ok, taking a step back.

* * *

Sub-flows.

I have a couple of them in my flows.

If some/one/any of them get a bit _confused_ that won't help the problem.

I have included messages so if a _variable_ isn't set which is needed/used to get things done, it spits out a generic message telling me so.

Obviously I can't have the node identify itself if its name hasn't been set.

I have a bunch of them for each machine I have and now and then (when deploy is pressed) they spit the dummy saying they aren't configured.

Question:  
I am doing "modified node" deploy.  
At boot there is an `inject` node which injects the name/s for the node/s.  
That survives a "modified node" deploy so long as the sub-flow isn't the node modified.

So why is it that these sub-flows are sending a "node not configured" message when they are? (Semi rhetorical)  
And if they send that message, it should be on going every time they are sent a message.  
They don't. It is just "now and then" - as said: usually after a deploy.

* * *

Timing.  
It was set to 20 seconds.  
I cranked it to 60 seconds. Leaving enough time for things to _settle down_ from the previous round.

No change to CPU load.

---

<div class="post-metadata">

**Author:** ![afelix](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/afelix/32/9743_2.png) [@afelix](https://discourse.nodered.org/u/afelix)\
**Post date:** [22 December 2019 22:56 UTC](https://discourse.nodered.org/t/can-someone-help-me-with-this-problem/19455/29 "2019-12-22T22:56:26Z")

</div>

Taking a step back too. Pkilling apache might shut it down for a bit, but not if it runs as a service, then the choice would be to stop the service.  
A better question is the why question. Is there a specific reason you need apache to run on this pi? If not, uninstall it or disable the service. If yes, pkilling is not a wise choice either.

---

<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:** [22 December 2019 22:58 UTC](https://discourse.nodered.org/t/can-someone-help-me-with-this-problem/19455/30 "2019-12-22T22:58:46Z")

</div>

Because (probably) a node I am using says it needs it.

---

<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:** [22 December 2019 23:16 UTC](https://discourse.nodered.org/t/can-someone-help-me-with-this-problem/19455/31 "2019-12-22T23:16:53Z")

</div>

FOUND IT!

This is a problem with writing code to detect errors with the `catch all` node.

There was some feedback from a `function` node which wasn't getting a `flow` variable name.  
(Which turns out wasn't set - and that in itself is a mystery as the `flow` value was/is/should be set by an `inject` node at start up.)

Anyway, following something else, I went to the flow which handles the errors and saw a node count going up at a great rate.

Stopping that has reduced the load back to 20%

New thread coming soon with questions about what I found on in that little journey.

[Previous page](https://discourse.nodered.org/t/can-someone-help-me-with-this-problem/19455.md?page=1)
