# No-Response / Disconnect of DB2

**URL:** https://discourse.nodered.org/t/no-response-disconnect-of-db2/89929
**Category:** Dashboard
**Tags:** docker, dashboard-2
**Created:** [1 August 2024 03:08 UTC](https://discourse.nodered.org/t/no-response-disconnect-of-db2/89929 "2024-08-01T03:08:39Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![xx\_Nexus\_xx](https://avatars.discourse-cdn.com/v4/letter/x/54ee81/32.png) [@xx\_Nexus\_xx](https://discourse.nodered.org/u/xx_Nexus_xx)
#### Post date: [1 August 2024 03:08 UTC](https://discourse.nodered.org/t/no-response-disconnect-of-db2/89929/1 "2024-08-01T03:08:39Z")

</div>

Hi,  
I'm currently migrating my flows from DB1 to DB2 and mostly using UI-Templates.

**Situation:**

- Node-Red is running on docker environment

- I primarily use ZIGBEE to control my lights

- the automation flows work seemless

- without any Dashboard UI open, the average CPU load is less than 2%

- when opening the UI-Dashboard or when switching between pages or when Reload (F5) there are long delays in displaying the UI (page is unresponsive). The CPU load spikes up-to 150%-220% for about 5-20sec  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/c/0cb9662c657563d43bdc22ba68486008d0c787db.png)

- occacionally I get the below LOG error messages when the page is not responsive  
_[info] [ui-base:DB2] Disconnected it7ep0xJqIUNtSGrAAAZ due to ping timeout_  
_[info] [ui-base:DB2] Disconnected SWU8wfVszeD-VyrDAAAP due to transport error_

- once the new page is loaded all the UI information are displayed and updated in realtime without any UI-errors (I checked debug-console)  

- I had similar pages in DB1 but never any delays or non-reponsive pages

Does anybody have similar issues with Page-Load and unresponsive Pages in DB2? .. Any Idea on what the issue could be.. or even how it can be solved ?

Thank you for your input and ideas

---

<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: [1 August 2024 07:57 UTC](https://discourse.nodered.org/t/no-response-disconnect-of-db2/89929/2 "2024-08-01T07:57:45Z")

</div>

Are you running both dashboards together, or is it this a new system?

What hardware/OS are you running?

If you run `top` or similar what processes are consuming the processor?

Are you running the browser on the system running node-red or on a separate PC?

---

<div class="post-metadata">

### Author: ![xx\_Nexus\_xx](https://avatars.discourse-cdn.com/v4/letter/x/54ee81/32.png) [@xx\_Nexus\_xx](https://discourse.nodered.org/u/xx_Nexus_xx)
#### Post date: [1 August 2024 08:51 UTC](https://discourse.nodered.org/t/no-response-disconnect-of-db2/89929/3 "2024-08-01T08:51:17Z")

</div>

Hello Colin,

I'm running a

- Ubuntu Linux system 8GB Ram,1.8Ghz 8-core as server only
- docker with portainer
- NR 4.0.2 with DB2 in one docker container
- the overal CPU load is never reported over 20%
- the shown CPU load (150%-220%) was for the NR container (taken from Portainer for NR container)
- the hey processes are
- 

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

- I checked the browser from 2 other systems (Windows and Apple) and they have the same behaviour

As said, the issue is only when loading/reloading a page ... than the entire page is frozen .. other bowser-tabs are working

---

<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: [1 August 2024 08:56 UTC](https://discourse.nodered.org/t/no-response-disconnect-of-db2/89929/4 "2024-08-01T08:56:43Z")

</div>

> [@xx\_Nexus\_xx](#):
>
> - the overal CPU load is never reported over 20%
> - the shown CPU load (150%-220%) was for the NR container (taken from Portainer for NR container)

That doesn't make sense to me, do you understand what it means?

Also I asked

> [@Colin](#):
>
> Are you running both dashboards together, or is it this a new system?

---

<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: [1 August 2024 09:32 UTC](https://discourse.nodered.org/t/no-response-disconnect-of-db2/89929/5 "2024-08-01T09:32:39Z")

</div>

> [@Colin](#):
>
> do you understand what it means?

It is reporting an aggregated value. It means that \>1 processor core is in use.

---

<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: [1 August 2024 12:37 UTC](https://discourse.nodered.org/t/no-response-disconnect-of-db2/89929/6 "2024-08-01T12:37:34Z")

</div>

> [@xx\_Nexus\_xx](#):
>
> the overal CPU load is never reported over 20%

What tool are you using for showing that?

> [@xx\_Nexus\_xx](#):
>
> there are long delays in displaying the UI (page is unresponsive).

How long is long?

If you view the dashboard from two different PCs and refresh the page on one of them, does the other lock up too?

if you create a new page with just, for example, a text node on it do you still see a delay when switching to that page?

Edit: Another thought, are you using ui-control or ui-event nodes to trigger actions?

---

<div class="post-metadata">

### Author: ![xx\_Nexus\_xx](https://avatars.discourse-cdn.com/v4/letter/x/54ee81/32.png) [@xx\_Nexus\_xx](https://discourse.nodered.org/u/xx_Nexus_xx)
#### Post date: [1 August 2024 23:58 UTC](https://discourse.nodered.org/t/no-response-disconnect-of-db2/89929/7 "2024-08-01T23:58:14Z")

</div>

Hi Colin,

- The overall CPU of 20% is checked with TOP comand and verified with WEBMIN tools  

- In regards of unresponsive UI I have to be more specific

- --\> the new page is showing in initial state (as per design state with no data (below is for a ui-chart)  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/b/ab438878aa91f777d8b131194b6b0e5fedd5548b.png)

- --\> sometime the Chrome Unresponsive message is popping up  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/e/3ee8e25e5b4fb7e1fef8c51716c62d13f3bc4eff.png)

- --\> Even the Main-button (top-left) is not accessible  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/9/7959913224f516bbe0dd24494ac882c75c399ae7.png)

- --\> after some time (usually 5-30sec) the UI-data is updated  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/9/8913d95054313f7f49943b141a647a8b721cd90b.png)

- any other automation/flow without UI-component does not show any imapct/delay

- --\> motion sensor is switching on light

- --\> log-files are sent to Telegram

- I'm not using ui-event or ui-control

- when the page is fully loaded the information are updated/displayed in real-time and all controls are working fine

- It looks worse with pages having more ui-templates (with vue elements)

- --\> this loading mostly OK  

- --\> this is usually having issues (not always)  

- as mentioned earlier , there are no error messages in the console-log for any of these pages or ui-elements

- simple pages are loading fine  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/9/495e20ea36e0d0729ac7d8bae879e56b03e8f923.png)

**Some additional info:**

- I'm running another NR 4.0.2 instance with DB1 in container on same machine (same flows / similar UI based on DB1) .... without any disconnects or delay issues .. DB2 is only difference
- I had deactivated this NR/DB1 for testing purposes with no impact (even full server restart ..just in case)
- all my servers are running on 1GB unifi backbone network
- I tried with wired and wifi based browser and behaviour is the same

It looks like there is a bottleneck somewhere when a new DB2 page is loaded .. especially with multiple ui-templates on it ... but I will further check

**Update:**

- i have the Db2 dashboard loaded in 2 browser tabs on same machine ..reloading/changing the page in the 1st tab does not impact the dashboard in 2nd tab
- same for browsers on 2 different machine ...no impact to others when a Db2 page is reloaded

Attached is my ui-template to control my lights  
[Ui-template\_for\_lights.json](https://discourse.nodered.org/uploads/short-url/5VXGsDuT4HHmlE7liVuoYQ1LWOu.json) (109.0 KB)

---

<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: [2 August 2024 06:58 UTC](https://discourse.nodered.org/t/no-response-disconnect-of-db2/89929/8 "2024-08-02T06:58:42Z")

</div>

With that chart, at what rate are new points being added to the chart? There are known issues with the performance of the chart node, It is going to be reworked I think.

---

<div class="post-metadata">

### Author: ![xx\_Nexus\_xx](https://avatars.discourse-cdn.com/v4/letter/x/54ee81/32.png) [@xx\_Nexus\_xx](https://discourse.nodered.org/u/xx_Nexus_xx)
#### Post date: [2 August 2024 07:12 UTC](https://discourse.nodered.org/t/no-response-disconnect-of-db2/89929/9 "2024-08-02T07:12:54Z")

</div>

Hi Colin,

the issue is only with initial load or on re-load .. this is not only for ui-chart but for other db2 elements (especially ui-template) as well.

for ui-chart im gathering 1 record every 2 seconds .. hold over 2 days max. I used that example to show the difference between initial state and after full-load (5-20sec)

I use ui-template the most and thats where I see the issue/delay/unresponiveness

---

<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: [2 August 2024 08:15 UTC](https://discourse.nodered.org/t/no-response-disconnect-of-db2/89929/10 "2024-08-02T08:15:28Z")

</div>

> [@xx\_Nexus\_xx](#):
>
> I use ui-template the most and thats where I see the issue/delay/unresponiveness

Are you able to share the code?

Also, can you share a screenshot of your browser's network tab after the page loads? Would be interesting to see if it is a specific resource request that is causing this.

---

<div class="post-metadata">

### Author: ![xx\_Nexus\_xx](https://avatars.discourse-cdn.com/v4/letter/x/54ee81/32.png) [@xx\_Nexus\_xx](https://discourse.nodered.org/u/xx_Nexus_xx)
#### Post date: [2 August 2024 09:01 UTC](https://discourse.nodered.org/t/no-response-disconnect-of-db2/89929/11 "2024-08-02T09:01:19Z")

</div>

This is the code of my ui-template for managing the lights .. I have at least 10 of em in 1 page  
[Ui-template\_for\_lights.json](https://discourse.nodered.org/uploads/short-url/5VXGsDuT4HHmlE7liVuoYQ1LWOu.json) (109.0 KB)

Network tab as asked

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/8/182712374bbc505f1d027804162dfcee01efd22e.png)  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/e/eec39848c63dc30607b516c87f2e8655c0d32f51.png)

---

<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: [2 August 2024 12:15 UTC](https://discourse.nodered.org/t/no-response-disconnect-of-db2/89929/12 "2024-08-02T12:15:16Z")

</div>

I tried to make sense of your flow but I'm afraid it escapes me. Partly because there are several node types I don't have and partly because the 1 D2 output I can see does not actually seem to make it onto my D2 output page so I can't really help understand where the issue might be.

Clearly I don't know D2 well enough.

This has me confused:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/7/0721ae5dabfeb565319c4612e789b9a788453343.png)

Why are the buttons to the right of the Group disabled?

---

<div class="post-metadata">

### Author: ![joepavitt](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/joepavitt/32/59722_2.png) [@joepavitt](https://discourse.nodered.org/u/joepavitt)
#### Post date: [2 August 2024 18:44 UTC](https://discourse.nodered.org/t/no-response-disconnect-of-db2/89929/13 "2024-08-02T18:44:25Z")

</div>

Fron what I've seen with others, I suspect the memory leak in ChartJS for time series data is causing your problems.

We are aware of it, and hoping to switch chart providers in the near future. Massive CPU spike anytime data is injected into the chart is what we have seen consistently

---

<div class="post-metadata">

### Author: ![xx\_Nexus\_xx](https://avatars.discourse-cdn.com/v4/letter/x/54ee81/32.png) [@xx\_Nexus\_xx](https://discourse.nodered.org/u/xx_Nexus_xx)
#### Post date: [2 August 2024 23:05 UTC](https://discourse.nodered.org/t/no-response-disconnect-of-db2/89929/14 "2024-08-02T23:05:46Z")

</div>

The buttons are disabled by default in initial state .. they will be enabled/disabled based on the dynamic data (e.g. from the init data in the flow) provided into the ui-template

---

<div class="post-metadata">

### Author: ![xx\_Nexus\_xx](https://avatars.discourse-cdn.com/v4/letter/x/54ee81/32.png) [@xx\_Nexus\_xx](https://discourse.nodered.org/u/xx_Nexus_xx)
#### Post date: [2 August 2024 23:12 UTC](https://discourse.nodered.org/t/no-response-disconnect-of-db2/89929/15 "2024-08-02T23:12:28Z")

</div>

Hi Joe,

yes I'm aware of the memory leak issue for charts, which is a secondary issue for me here as I used the chart as a sample to show the behaviour.

My primary issue is with the use of multiple (8+) ui-templates with vue elements in one page as these pages often becomes unresponsive for 5-30 sec until all the data is loaded. I did provide a flow sample earlier already (see details above)

---

<div class="post-metadata">

### Author: ![joepavitt](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/joepavitt/32/59722_2.png) [@joepavitt](https://discourse.nodered.org/u/joepavitt)
#### Post date: [3 August 2024 07:34 UTC](https://discourse.nodered.org/t/no-response-disconnect-of-db2/89929/16 "2024-08-03T07:34:11Z")

</div>

> [@xx\_Nexus\_xx](#):
>
> I did provide a flow sample earlier already (see details above)

Thanks, I can take a proper look on Tuesday. I have pages with dozens of Templates on that render fine, so suspect there will be specific problem here, rather than a generalised template problem.

---

<div class="post-metadata">

### Author: ![xx\_Nexus\_xx](https://avatars.discourse-cdn.com/v4/letter/x/54ee81/32.png) [@xx\_Nexus\_xx](https://discourse.nodered.org/u/xx_Nexus_xx)
#### Post date: [4 August 2024 02:25 UTC](https://discourse.nodered.org/t/no-response-disconnect-of-db2/89929/17 "2024-08-04T02:25:31Z")

</div>

Hi Joe,

based on info from Julian, I monitored the console-log for network more closely and seen that the [websocket.io](http://websocket.io) is pending for a long time

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/1/f1ae932b369111d858dd3fc6be7bc899895a02b9.png)  
console log  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/4/448a3aec024ac46ef67bf674659a3a76db0492d6.png)

Could there be any issue with my websocket config or network setup for Node-Red. As said my system is

- Ubuntu Linux system 8GB Ram,1.8Ghz 8-core as server only
- docker with portainer
- NR 4.0.2 with DB2 in one docker container
- Unifi backend system with 1GB
- Servers are wired, desktop with browser is wired

**Other observation:**  
over time (~2 days) the system becomes worse with the UI and I need to restart the docker container

---

<div class="post-metadata">

### Author: ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)
#### Post date: [4 August 2024 07:19 UTC](https://discourse.nodered.org/t/no-response-disconnect-of-db2/89929/18 "2024-08-04T07:19:10Z")

</div>

Hi @xx_Nexus_xx,

You can also do some _ **CPU profiling** _ of the Node-RED server-side instance in your Docker container, to find the root cause.

There might be better ways to do it, but you could do it like this:

1. Follow the Docker specific [steps](https://github.com/bartbutenaers/node-red-contrib-inspector?tab=readme-ov-file#usage-in-a-docker-container) for my inspector node.  
BTW I don't use Docker myself...
2. Import the example flow from that same readme page, so you can enable debug mode of the NodeJs application server running in your Docker container.
3. Connect with your Chrome developer tools to your server-side NodeJs instance, and start a CPU profiling (see [wiki](https://github.com/bartbutenaers/node-red-contrib-inspector/wiki/Use-CPU-profile-to-determine-what-takes-so-long) page).
4. Have a look at e.g. the _ **CPU flame charts** _, and hopefully you find that way which code snippet is taking so long.

Good luck!

---

<div class="post-metadata">

### Author: ![xx\_Nexus\_xx](https://avatars.discourse-cdn.com/v4/letter/x/54ee81/32.png) [@xx\_Nexus\_xx](https://discourse.nodered.org/u/xx_Nexus_xx)
#### Post date: [4 August 2024 07:25 UTC](https://discourse.nodered.org/t/no-response-disconnect-of-db2/89929/19 "2024-08-04T07:25:14Z")

</div>

thx .. I will give it a try

---

<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: [4 August 2024 07:44 UTC](https://discourse.nodered.org/t/no-response-disconnect-of-db2/89929/20 "2024-08-04T07:44:13Z")

</div>

Does this even make sense ?

```auto
data:image/jpg;base64, https:..... pointing to a png

```

`base64` indicates that a base64 string should follow.

[Next page](https://discourse.nodered.org/t/no-response-disconnect-of-db2/89929.md?page=2)
