# Workspace stops working to many connections? on Raspberry Pi

**URL:** https://discourse.nodered.org/t/workspace-stops-working-to-many-connections-on-raspberry-pi/93522
**Category:** General
**Created:** [27 November 2024 15:20 UTC](https://discourse.nodered.org/t/workspace-stops-working-to-many-connections-on-raspberry-pi/93522 "2024-11-27T15:20:41Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![KarelSebela](https://avatars.discourse-cdn.com/v4/letter/k/35a633/32.png) [@KarelSebela](https://discourse.nodered.org/u/KarelSebela)
#### Post date: [27 November 2024 15:20 UTC](https://discourse.nodered.org/t/workspace-stops-working-to-many-connections-on-raspberry-pi/93522/1 "2024-11-27T15:20:41Z")

</div>

I have installation on RaspberryPi.  
Node-red, DB.  
Everithing is working fine.  
after several hours I cannot login to web. not flow space nor user pages are available.  
But when I check data in DB they are growing. Node-red and its flow are doing the job that I programed.  
Only solution si tu kill proces. or restart node-red or all Raspberry.  
Thank everything is working for several hours.

Any suggestion Please.

---

<div class="post-metadata">

### Author: ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)
#### Post date: [27 November 2024 15:36 UTC](https://discourse.nodered.org/t/workspace-stops-working-to-many-connections-on-raspberry-pi/93522/2 "2024-11-27T15:36:03Z")

</div>

Are you accessing Node-red with a browser on the Pi?

If you also have a PC on the same network you might find it better to use the PC's browser to access node-red at \<Pi's IP\>:1880

---

<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: [27 November 2024 15:51 UTC](https://discourse.nodered.org/t/workspace-stops-working-to-many-connections-on-raspberry-pi/93522/3 "2024-11-27T15:51:51Z")

</div>

Also, when it fails, run `top` in a command window to check whether something is hogging the processor.

> [@KarelSebela](#):
>
> I cannot login to web.

Exactly what happens when you try?

---

<div class="post-metadata">

### Author: ![KarelSebela](https://avatars.discourse-cdn.com/v4/letter/k/35a633/32.png) [@KarelSebela](https://discourse.nodered.org/u/KarelSebela)
#### Post date: [27 November 2024 18:11 UTC](https://discourse.nodered.org/t/workspace-stops-working-to-many-connections-on-raspberry-pi/93522/4 "2024-11-27T18:11:23Z")

</div>

Hi Yes I am accessing from different PC with port 1880.  
and As I wrote everithing is working find.  
After sever hours it start to reply slowly and slowlier. every refresh is worse  
nutil it stops replying.

---

<div class="post-metadata">

### Author: ![KarelSebela](https://avatars.discourse-cdn.com/v4/letter/k/35a633/32.png) [@KarelSebela](https://discourse.nodered.org/u/KarelSebela)
#### Post date: [27 November 2024 18:12 UTC](https://discourse.nodered.org/t/workspace-stops-working-to-many-connections-on-raspberry-pi/93522/5 "2024-11-27T18:12:23Z")

</div>

> [@Colin](#):
>
> c

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/9/2911ba2d2a716d45be18a26a2f3b7e971d953ad5.png)

---

<div class="post-metadata">

### Author: ![KarelSebela](https://avatars.discourse-cdn.com/v4/letter/k/35a633/32.png) [@KarelSebela](https://discourse.nodered.org/u/KarelSebela)
#### Post date: [27 November 2024 18:13 UTC](https://discourse.nodered.org/t/workspace-stops-working-to-many-connections-on-raspberry-pi/93522/6 "2024-11-27T18:13:58Z")

</div>

and when I list ports

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/b/abdd18ebfc880cf2a182afe9787ac3e4d359a282.png)

and in this situation I am trying to access server from different PC.

Only shat helps is restart node-red

---

<div class="post-metadata">

### Author: ![KarelSebela](https://avatars.discourse-cdn.com/v4/letter/k/35a633/32.png) [@KarelSebela](https://discourse.nodered.org/u/KarelSebela)
#### Post date: [27 November 2024 18:18 UTC](https://discourse.nodered.org/t/workspace-stops-working-to-many-connections-on-raspberry-pi/93522/7 "2024-11-27T18:18:41Z")

</div>

> [@Colin](#):
>
> Exactly what happens when you try?

I access web dashboard and I am programing my flows. everything is fine.  
after server hour of work on not working after refresh I see

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/4/74fcb7e52ce1a0e4da0c9f147e996dfad1795e47.png)

and it is start server minute  
after another ferresch it is eve slower.

and after while it doesn't opens at all.

---

<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: [27 November 2024 20:39 UTC](https://discourse.nodered.org/t/workspace-stops-working-to-many-connections-on-raspberry-pi/93522/8 "2024-11-27T20:39:10Z")

</div>

Node red is using 153% of a cpu core, which means that it is probably stuck in a loop of some sort, or just doing more and more work as time goes on.

How much cpu is it using initially? Does the percentage increase slowly over the hour that it takes to clog up?

Stop node-red and start it again in a command window. If you installed using the recommended method then you can do that using  
`node-red-stop`  
`node-red-start`  
then copy/paste the startup log that you see. Copy/paste please, not screenshot.

---

<div class="post-metadata">

### Author: ![KarelSebela](https://avatars.discourse-cdn.com/v4/letter/k/35a633/32.png) [@KarelSebela](https://discourse.nodered.org/u/KarelSebela)
#### Post date: [27 November 2024 20:53 UTC](https://discourse.nodered.org/t/workspace-stops-working-to-many-connections-on-raspberry-pi/93522/9 "2024-11-27T20:53:17Z")

</div>

I did monitor it for several minutes nos and ti jump between 90-130% CPU  
I will check it later for this value and report back.

I didi try to restart as You suggested.

karel@raspberrypi:~ $ node-red-stop  
Stop Node-RED

Use node-red-start to start Node-RED again

karel@raspberrypi:~ $ node-red-start

Start Node-RED

Once Node-RED has started, point a browser at h ttp://10.0.0.10: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](http://flows.nodered.org)

# Starting as a systemd service. 27 Nov 21:47:33 - [info] Welcome to Node-RED

27 Nov 21:47:33 - [info] Node-RED version: v4.0.5  
27 Nov 21:47:33 - [info] Node.js version: v20.18.0  
27 Nov 21:47:33 - [info] Linux 6.6.51+rpt-rpi-v8 arm64 LE  
27 Nov 21:47:34 - [info] Loading palette nodes  
27 Nov 21:47:38 - [info] Dashboard version 3.6.5 started at /ui  
27 Nov 21:47:39 - [info] node-red-contrib-home-assistant-websocket v0.74.2 nodes initialized  
27 Nov 21:47:39 - [info] Settings file : /home/karel/.node-red/settings.js  
27 Nov 21:47:39 - [info] Context store : 'default' [module=memory]  
27 Nov 21:47:39 - [info] User directory : /home/karel/.node-red  
27 Nov 21:47:39 - [warn] Projects disabled : editorTheme.projects.enabled=false  
27 Nov 21:47:39 - [info] Flows file : /home/karel/.node-red/flows.json  
27 Nov 21:47:39 - [error] Unable to listen on h ttps://127.0.0.1:1880/  
27 Nov 21:47:39 - [error] Error: port in use  
nodered.service: Main process exited, code=exited, status=1/FAILURE  
nodered.service: Failed with result 'exit-code'.  
nodered.service: Consumed 8.638s CPU time.

Unfortunately. I cannot start it from terminal because I have it setup as a service and it always start atomaticali after stop. That is why Error port in user. because it is already started.

karel@raspberrypi:~ $ sudo lsof -i :1880  
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME  
node-red 2289 karel 19u IPv4 24359 0t0 TCP \*:1880 (LISTEN)

Thare fore I don't know what is happening after start.

I didi try to setup log file. but in documentation is written that login to file is not supported. Therefore I don't have any more log informations ☹

---

<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: [27 November 2024 20:58 UTC](https://discourse.nodered.org/t/workspace-stops-working-to-many-connections-on-raspberry-pi/93522/10 "2024-11-27T20:58:21Z")

</div>

> [@KarelSebela](#):
>
> I did monitor it for several minutes nos and ti jump between 90-130% CPU

It is already clogged up then. Typically node red should only be using a few percent, maybe up to 10 or 20 if it is very busy.

> [@KarelSebela](#):
>
> Unfortunately. I cannot start it from terminal because I have it setup as a service and it always start atomaticali after stop. That is why Error port in user. because it is already started.

`node-red-stop` should stop it running as a service, and it will not restart. However, if it is already clogged up it may take some time to stop. Run `node-red-stop` and then monitor `top` until node-red stops. Then restart it.

---

<div class="post-metadata">

### Author: ![KarelSebela](https://avatars.discourse-cdn.com/v4/letter/k/35a633/32.png) [@KarelSebela](https://discourse.nodered.org/u/KarelSebela)
#### Post date: [27 November 2024 21:06 UTC](https://discourse.nodered.org/t/workspace-stops-working-to-many-connections-on-raspberry-pi/93522/11 "2024-11-27T21:06:37Z")

</div>

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

ok I did use

**karel@raspberrypi** : **~ $** node-red-stop

**Stop**  **Node-RED**

Use node-red-start to start Node-RED again

and monitors top command for 2 min  
and node-red did not desepier at all it is hovering  
around 60-115%

Would it help If I would give you access to RPi?

---

<div class="post-metadata">

### Author: ![KarelSebela](https://avatars.discourse-cdn.com/v4/letter/k/35a633/32.png) [@KarelSebela](https://discourse.nodered.org/u/KarelSebela)
#### Post date: [27 November 2024 21:12 UTC](https://discourse.nodered.org/t/workspace-stops-working-to-many-connections-on-raspberry-pi/93522/12 "2024-11-27T21:12:03Z")

</div>

As you suggested. I may have problem in some of my flow that it is in loop or something.

I have quit big program Export of my nodes is over 1700 lines...

Perhaps I have a problem there. Logical think would be to delete (archive) everything.

And start from beginning slowly node by node and see which may coz overload.

and also if I delete everything logically stop a and start should behave as you suggested.

Is it correct idea? What about pallete plugins? could there be problem in them?

---

<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: [27 November 2024 21:19 UTC](https://discourse.nodered.org/t/workspace-stops-working-to-many-connections-on-raspberry-pi/93522/13 "2024-11-27T21:19:20Z")

</div>

Run  
`sudo systemctl disable nodered`  
and reboot. Node red should not restart. Check that it is not running. Then you can start it with  
`node-red-start`.

> [@KarelSebela](#):
>
> Perhaps I have a problem there. Logical think would be to delete (archive) everything.

You can disable individual flow tabs. Double click on the tab and there is an enable/disable button bottom left. That may be a good way of finding where the problem lies.

---

<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: [27 November 2024 21:22 UTC](https://discourse.nodered.org/t/workspace-stops-working-to-many-connections-on-raspberry-pi/93522/14 "2024-11-27T21:22:00Z")

</div>

Another thought, are you using MQTT? It is easy to build an MQTT loop. Test for that by stopping the MQTT broker when node-red is clogged up.

---

<div class="post-metadata">

### Author: ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)
#### Post date: [27 November 2024 21:22 UTC](https://discourse.nodered.org/t/workspace-stops-working-to-many-connections-on-raspberry-pi/93522/15 "2024-11-27T21:22:25Z")

</div>

You can try disabling a bunch of flows and seeing if the problem still occurs.  
It's easier to first disable any which don't have too many connections from one flow to another.

You should also look for any loops, either directly in the wires between nodes, or loops with external services. eg MQTT.

Colin seems to have said all that already.

---

<div class="post-metadata">

### Author: ![KarelSebela](https://avatars.discourse-cdn.com/v4/letter/k/35a633/32.png) [@KarelSebela](https://discourse.nodered.org/u/KarelSebela)
#### Post date: [27 November 2024 21:23 UTC](https://discourse.nodered.org/t/workspace-stops-working-to-many-connections-on-raspberry-pi/93522/16 "2024-11-27T21:23:39Z")

</div>

**karel@raspberrypi** : **~ $** sudo systemctl disable nodered

**karel@raspberrypi** : **~ $**

and I still see

```
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND                              

```

2289 karel 20 0 10.3g 386044 48384 R 115.6 9.9 79:46.15 node-red  
810 mysql 20 0 2282716 124316 23168 S 23.5 3.2 43:23.29 mariadbd  
1161 karel 20 0 815136 63616 47360 S 0.3 1.6 0:09.26 wf-panel-pi  
3044 karel 20 0 11828 4992 2816 R 0.3 0.1 0:06.57 top

So I didi  
**karel@raspberrypi** : **~ $** sudo systemctl disable node-red

Removed "/etc/systemd/system/multi-user.target.wants/node-red.service".

No help still see

```
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND                              

```

2289 karel 20 0 10.3g 346148 48384 R 55.6 8.9 80:39.67 node-red  
810 mysql 20 0 2282716 124316 23168 S 23.5 3.2 43:32.55 mariadbd  
535 avahi 20 0 7516 3072 2688 S 0.3 0.1 0:39.79 avahi-

Only way that I can kill it si by  
karel@raspberrypi:~ $ sudo lsof -i :1880  
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME  
node-red 2289 karel 19u IPv4 24359 0t0 TCP \*:1880 (LISTEN)  
^[[A^[[Anode-red 2289 karel 36u IPv4 31195 0t0 TCP 10.0.0.10:1880-\>86.48.15.77:10180 (ESTABLISHED)  
karel@raspberrypi:~ $ kill -9 2289

but that after 15s node-red starts appearing in top command  
So it did stop but started automatically.

---

<div class="post-metadata">

### Author: ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)
#### Post date: [27 November 2024 21:26 UTC](https://discourse.nodered.org/t/workspace-stops-working-to-many-connections-on-raspberry-pi/93522/17 "2024-11-27T21:26:51Z")

</div>

> [@KarelSebela](#):
>
> sudo systemctl disable nodered

This stops Node-red from starting automatically at boot but it does not stop it.  
You also need sudo systemctl stop nodered

Also useful is sudo systemctl status nodered.

How did you install Node-red?

---

<div class="post-metadata">

### Author: ![KarelSebela](https://avatars.discourse-cdn.com/v4/letter/k/35a633/32.png) [@KarelSebela](https://discourse.nodered.org/u/KarelSebela)
#### Post date: [27 November 2024 21:33 UTC](https://discourse.nodered.org/t/workspace-stops-working-to-many-connections-on-raspberry-pi/93522/18 "2024-11-27T21:33:38Z")

</div>

Great it did help to kill and not start node-red again. super. Now I was able to start it in console

I didi diesable all flow and I am starting slow with one by one flows.

About install I did flolow installation instruction on this pages. using command line.

```auto
Starting as a systemd service.
27 Nov 22:29:15 - [info]
Welcome to Node-RED
===================
27 Nov 22:29:15 - [info] Node-RED version: v4.0.5
27 Nov 22:29:15 - [info] Node.js version: v20.18.0
27 Nov 22:29:15 - [info] Linux 6.6.51+rpt-rpi-v8 arm64 LE
27 Nov 22:29:16 - [info] Loading palette nodes
27 Nov 22:29:19 - [info] Dashboard version 3.6.5 started at /ui
27 Nov 22:29:20 - [info] node-red-contrib-home-assistant-websocket v0.74.2 nodes initialized
27 Nov 22:29:20 - [info] Settings file : /home/karel/.node-red/settings.js
27 Nov 22:29:20 - [info] Context store : 'default' [module=memory]
27 Nov 22:29:20 - [info] User directory : /home/karel/.node-red
27 Nov 22:29:20 - [warn] Projects disabled : editorTheme.projects.enabled=false
27 Nov 22:29:20 - [info] Flows file : /home/karel/.node-red/flows.json
27 Nov 22:29:20 - [info] Server now running at h ttps://127.0.0.1:1880/
27 Nov 22:29:20 - [info] Starting flows
27 Nov 22:29:20 - [info] [ui-base:My Dashboard] Node-RED Dashboard 2.0 (v1.19.1) started at /dashboard
27 Nov 22:29:20 - [info] [ui-base:My Dashboard] Created socket. io server bound to Node-RED port at path /dashboard/socket.io
27 Nov 22:29:21 - [info] Started flows
27 Nov 22:29:21 - [info] [tasmota-mqtt-broker:mqttOnPi] Connected to broker: mqtt://10.0.0.10:1883
27 Nov 22:29:21 - [error] [mysql:4f73c73850fdbfd2] Database not connected
27 Nov 22:29:21 - [error] [mysql:324f4d61de69e59e] Database not connected
27 Nov 22:29:21 - [error] [mysql:76132c62b576d619] Database not connected
27 Nov 22:29:21 - [error] [mysql:fe5aeed1a2226ee5] Database not connected
27 Nov 22:29:21 - [error] [mysql:22629cdfc52ca2fd] Database not connected
27 Nov 22:29:21 - [error] [mysql:637535bc7817ce06] Database not connected
27 Nov 22:29:21 - [error] [mysql:4e834fb0f6c54f9c] Database not connected
27 Nov 22:29:21 - [error] [mysql:de0fc93e74e67672] Database not connected
27 Nov 22:29:21 - [error] [mysql:e8a2bc7ea34d7271] Database not connected
27 Nov 22:29:21 - [info] [mqtt-broker:mqqtOnPi] Connection failed to broker: mqtt://10.0.0.10:1883
27 Nov 22:29:21 - [info] [mqtt-broker:mqqtOnPi] Connection failed to broker: mqtt://10.0.0.10:1883
27 Nov 22:29:36 - [info] [mqtt-broker:mqqtOnPi] Connection failed to broker: mqtt://10.0.0.10:1883
27 Nov 22:29:36 - [info] [mqtt-broker:mqqtOnPi] Connection failed to broker: mqtt://10.0.0.10:1883

```

---

<div class="post-metadata">

### Author: ![KarelSebela](https://avatars.discourse-cdn.com/v4/letter/k/35a633/32.png) [@KarelSebela](https://discourse.nodered.org/u/KarelSebela)
#### Post date: [27 November 2024 21:42 UTC](https://discourse.nodered.org/t/workspace-stops-working-to-many-connections-on-raspberry-pi/93522/19 "2024-11-27T21:42:29Z")

</div>

I will take me some time to find out which flow is overloading it.

But You both give me

1. great idea to debug it one by one... because of top CPU over use
2. how to kill it properly And now I finally see my log that also help.

Thanks one more time. I will now go slowly adding flow and waiting for a while it CPU will not rice again.

---

<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: [27 November 2024 21:47 UTC](https://discourse.nodered.org/t/workspace-stops-working-to-many-connections-on-raspberry-pi/93522/20 "2024-11-27T21:47:28Z")

</div>

> [@KarelSebela](#):
>
> **karel@raspberrypi** : **~ $** sudo systemctl disable nodered
> 
> **karel@raspberrypi** : **~ $**
> 
> and I still see

Please read posts more carefully, I suggested;

> [@Colin](#):
>
> Run  
> `sudo systemctl disable nodered`  
> **and reboot**. Node red should not restart. Check that it is not running. Then you can start it with  
> `node-red-start`.

[Next page](https://discourse.nodered.org/t/workspace-stops-working-to-many-connections-on-raspberry-pi/93522.md?page=2)
