# Recursive disconnection from the node-red server

**URL:** https://discourse.nodered.org/t/recursive-disconnection-from-the-node-red-server/95257
**Category:** General
**Created:** [9 February 2025 14:48 UTC](https://discourse.nodered.org/t/recursive-disconnection-from-the-node-red-server/95257 "2025-02-09T14:48:12Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![pin32](https://avatars.discourse-cdn.com/v4/letter/p/2bfe46/32.png) [@pin32](https://discourse.nodered.org/u/pin32)
#### Post date: [9 February 2025 14:48 UTC](https://discourse.nodered.org/t/recursive-disconnection-from-the-node-red-server/95257/1 "2025-02-09T14:48:12Z")

</div>

Hello, guys.  
I’m getting disconnections from the server quite often, I think with restart of the server.  
I’m working with a RPI4.  
Is this a known problem?

---

<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: [9 February 2025 15:11 UTC](https://discourse.nodered.org/t/recursive-disconnection-from-the-node-red-server/95257/2 "2025-02-09T15:11:05Z")

</div>

Not enough info I'm afraid.

> [@pin32](#):
>
> disconnections from the server

what does that mean exactly? Describe exactly what you are doing and what you are seeing.  
for example, where is "the server" - remove (over internet)? in your local network? etc

> [@pin32](#):
>
> Is this a known problem?

Yes, if your flows are crashing and your node-red is set to auto-restart (like a service) then this (one of) the effects you would see.

---

<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: [9 February 2025 15:13 UTC](https://discourse.nodered.org/t/recursive-disconnection-from-the-node-red-server/95257/3 "2025-02-09T15:13:51Z")

</div>

Do you mean that you think node red is restarting when it should not? If so then watch the node red log output to see what is happening. To do that run  
`node-red-log`  
And leave it running till it restarts.

---

<div class="post-metadata">

### Author: ![pin32](https://avatars.discourse-cdn.com/v4/letter/p/2bfe46/32.png) [@pin32](https://discourse.nodered.org/u/pin32)
#### Post date: [9 February 2025 16:07 UTC](https://discourse.nodered.org/t/recursive-disconnection-from-the-node-red-server/95257/4 "2025-02-09T16:07:21Z")

</div>

then, the server is on lan (no wireles), but I exclude a restart of the machine because ssh does not disconnect.  
There are many streams but I don’t get a warning in the interface.  
It seems (but I’m not sure) that they happen when I am modifying some nodes, but maybe because at other times I do not see it.  
I left the event log open and wait for it to happen again...

---

<div class="post-metadata">

### Author: ![pin32](https://avatars.discourse-cdn.com/v4/letter/p/2bfe46/32.png) [@pin32](https://discourse.nodered.org/u/pin32)
#### Post date: [9 February 2025 16:52 UTC](https://discourse.nodered.org/t/recursive-disconnection-from-the-node-red-server/95257/5 "2025-02-09T16:52:32Z")

</div>

![Schermata del 2025-02-09 17-50-39](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/0/d0230de9a910e8a7064035c1c2d2cf013f4fd318.png)  
Nothing is shown on the log

---

<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: [9 February 2025 16:54 UTC](https://discourse.nodered.org/t/recursive-disconnection-from-the-node-red-server/95257/6 "2025-02-09T16:54:18Z")

</div>

Did it happen at a random time or when you were doing something?

---

<div class="post-metadata">

### Author: ![pin32](https://avatars.discourse-cdn.com/v4/letter/p/2bfe46/32.png) [@pin32](https://discourse.nodered.org/u/pin32)
#### Post date: [9 February 2025 18:47 UTC](https://discourse.nodered.org/t/recursive-disconnection-from-the-node-red-server/95257/7 "2025-02-09T18:47:54Z")

</div>

during the deployment, at least this time.

---

<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: [9 February 2025 19:09 UTC](https://discourse.nodered.org/t/recursive-disconnection-from-the-node-red-server/95257/8 "2025-02-09T19:09:59Z")

</div>

There should have been something in the log to show the deployment. What did it say? Post the log around the failure please.

What sort of deployment are you doing? Full, flow or nodes?  
If you are doing a full deploy then perhaps something you do on startup lock up node red for a while. How long does it stop for?

---

<div class="post-metadata">

### Author: ![pin32](https://avatars.discourse-cdn.com/v4/letter/p/2bfe46/32.png) [@pin32](https://discourse.nodered.org/u/pin32)
#### Post date: [9 February 2025 19:35 UTC](https://discourse.nodered.org/t/recursive-disconnection-from-the-node-red-server/95257/9 "2025-02-09T19:35:10Z")

</div>

It stops for a little 15/30 seconds, but it does not happen only with deploy it also appears sporadically

---

<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: [9 February 2025 19:55 UTC](https://discourse.nodered.org/t/recursive-disconnection-from-the-node-red-server/95257/10 "2025-02-09T19:55:31Z")

</div>

As well as keeping the log open, open another window and run  
`top`  
Under normal operation is anything using a lot of CPU?  
When it hangs is anything using a lot of CPU.

You didn't answer my question:

> [@Colin](#):
>
> What sort of deployment are you doing? Full, flow or nodes?

Post the log around when it happens when it next occurs.

---

<div class="post-metadata">

### Author: ![pin32](https://avatars.discourse-cdn.com/v4/letter/p/2bfe46/32.png) [@pin32](https://discourse.nodered.org/u/pin32)
#### Post date: [9 February 2025 20:37 UTC](https://discourse.nodered.org/t/recursive-disconnection-from-the-node-red-server/95257/11 "2025-02-09T20:37:31Z")

</div>

![Schermata del 2025-02-09 21-35-07](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/7/f7df8fa11683402d660b1c9a12c5566b10872cf1.png)  
Perhaps this is it?  
the deploy I do it full, the cpu load is around 10/20 % max

---

<div class="post-metadata">

### Author: ![pin32](https://avatars.discourse-cdn.com/v4/letter/p/2bfe46/32.png) [@pin32](https://discourse.nodered.org/u/pin32)
#### Post date: [9 February 2025 20:41 UTC](https://discourse.nodered.org/t/recursive-disconnection-from-the-node-red-server/95257/12 "2025-02-09T20:41:40Z")

</div>

![Schermata del 2025-02-09 21-40-54](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/3/f3232d6124efd83a36058087d4267aef4ef059e1.png)

---

<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: [9 February 2025 20:42 UTC](https://discourse.nodered.org/t/recursive-disconnection-from-the-node-red-server/95257/13 "2025-02-09T20:42:13Z")

</div>

> [@pin32](#):
>
> I do it full

Why?

Is there a specific reason you do full deploy? You know when you do full deploy it destroys and recreates every single node and every single connection and every single "thing". Node deploy on the other hand, only recreates the nodes that have been altered. There are occasions where full deploy is beneficial/best, but in most cases node deploy is the better option.

---

<div class="post-metadata">

### Author: ![pin32](https://avatars.discourse-cdn.com/v4/letter/p/2bfe46/32.png) [@pin32](https://discourse.nodered.org/u/pin32)
#### Post date: [9 February 2025 20:46 UTC](https://discourse.nodered.org/t/recursive-disconnection-from-the-node-red-server/95257/14 "2025-02-09T20:46:04Z")

</div>

I did not think it was so heavy... passed to mode node...  
But the host ip has nothing to do with it?

---

<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: [9 February 2025 21:38 UTC](https://discourse.nodered.org/t/recursive-disconnection-from-the-node-red-server/95257/15 "2025-02-09T21:38:31Z")

</div>

The reason that you get the port in use error is because node red is running and you have tried to start another one. Perhaps you used the command `node-red log` instead of `node-red-log`.

> [@pin32](#):
>
> But the host ip has nothing to do with it?

I don't understand what you mean by that. When you do a full deploy the load is on the machine running node-red.

In your `htop` output there are loads of python commands running, each consuming 5 or 6% of the processor. What are those all about?

---

<div class="post-metadata">

### Author: ![pin32](https://avatars.discourse-cdn.com/v4/letter/p/2bfe46/32.png) [@pin32](https://discourse.nodered.org/u/pin32)
#### Post date: [9 February 2025 22:27 UTC](https://discourse.nodered.org/t/recursive-disconnection-from-the-node-red-server/95257/16 "2025-02-09T22:27:48Z")

</div>

on the machine runs only node-red, I think they are due to pwm, gpio, i2c, and little else, as I can investigate for the problem of disconnection

---

<div class="post-metadata">

### Author: ![pin32](https://avatars.discourse-cdn.com/v4/letter/p/2bfe46/32.png) [@pin32](https://discourse.nodered.org/u/pin32)
#### Post date: [15 February 2025 07:37 UTC](https://discourse.nodered.org/t/recursive-disconnection-from-the-node-red-server/95257/17 "2025-02-15T07:37:05Z")

</div>

I look forward to some advice to investigate the problem. thanks

---

<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: [15 February 2025 08:24 UTC](https://discourse.nodered.org/t/recursive-disconnection-from-the-node-red-server/95257/18 "2025-02-15T08:24:23Z")

</div>

Run  
`node-red-reload`  
Which will restart node red. Post the full output here. Copy/paste please, not screenshot.

Then leave that window open, and when the error occurs see what is in the log at that time.

---

<div class="post-metadata">

### Author: ![pin32](https://avatars.discourse-cdn.com/v4/letter/p/2bfe46/32.png) [@pin32](https://discourse.nodered.org/u/pin32)
#### Post date: [16 February 2025 08:21 UTC](https://discourse.nodered.org/t/recursive-disconnection-from-the-node-red-server/95257/19 "2025-02-16T08:21:49Z")

</div>

> [@Colin](#):
>
> node-red-reload

```auto
pin32@Node-Red:~ $ node-red-reload
Stop Node-RED
 
Use node-red-start to start Node-RED again
 

Start Node-RED
 
Once Node-RED has started, point a browser at http://192.168.1.96:1880
On Pi Node-RED works better with the Firefox or Chrome browser
 
Use node-red-stop to stop Node-RED
Use node-red-start to start Node-RED again
Use node-red-log to view the recent log output
Use sudo systemctl enable nodered.service to autostart Node-RED at every boot
Use sudo systemctl disable nodered.service to disable autostart on boot
 
To find more nodes and example flows - go to http://flows.nodered.org
 
Starting as a systemd service.
16 Feb 09:20:41 - [info] Settings file : /home/pin32/.node-red/settings.js
16 Feb 09:20:41 - [info] Context store : 'default' [module=memory]
16 Feb 09:20:41 - [info] User directory : /home/pin32/.node-red
16 Feb 09:20:41 - [warn] Projects disabled : editorTheme.projects.enabled=false
16 Feb 09:20:41 - [info] Flows file : /home/pin32/.node-red/flows.json
16 Feb 09:20:41 - [info] Server now running at http://127.0.0.1:1880/
16 Feb 09:20:41 - [warn] Using unencrypted credentials
16 Feb 09:20:41 - [info] Starting flows
  MCP23017 chip initialization OK. BusNumber=1 Address=0X27 id:ac05a4c7c52289c4 startAllHigh = false
  MCP23017 chip initialization OK. BusNumber=1 Address=0X20 id:891324a310fe6192 startAllHigh = false
16 Feb 09:20:46 - [info] Started flows
16 Feb 09:20:46 - [info] [serialconfig:831becf24befe30b] serial port /dev/ttyACM0 opened at 2400 baud 8N1
16 Feb 09:20:46 - [error] [serialconfig:5a5b2278df870dd4] serial port /dev/ttyUSB0 error: Error: Error: No such file or directory, cannot open /dev/ttyUSB0
16 Feb 09:20:46 - [info] [mqtt-broker:e276a877253691df] Connected to broker: mqtt://192.168.1.99:1883

```

---

<div class="post-metadata">

### Author: ![pin32](https://avatars.discourse-cdn.com/v4/letter/p/2bfe46/32.png) [@pin32](https://discourse.nodered.org/u/pin32)
#### Post date: [16 February 2025 08:26 UTC](https://discourse.nodered.org/t/recursive-disconnection-from-the-node-red-server/95257/20 "2025-02-16T08:26:40Z")

</div>

a serial is disconnected at this time but even reconnecting the problem persists

[Next page](https://discourse.nodered.org/t/recursive-disconnection-from-the-node-red-server/95257.md?page=2)
