# "Connection lost" on a specific dashboard tab

**URL:** https://discourse.nodered.org/t/connection-lost-on-a-specific-dashboard-tab/71780
**Category:** Dashboard
**Created:** [6 December 2022 17:49 UTC](https://discourse.nodered.org/t/connection-lost-on-a-specific-dashboard-tab/71780 "2022-12-06T17:49:40Z")
**Posts on this page:** 4
**Page:** 1

<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: [6 December 2022 17:49 UTC](https://discourse.nodered.org/t/connection-lost-on-a-specific-dashboard-tab/71780/1 "2022-12-06T17:49:40Z")

</div>

I currently have three dashboard tabs.  
One of them draws a chart with 4 lines using data from MySQL.  
When I switch to this tab using the dashboard hamburger menu:

- A mesage pops up "Connection lost" for a second.
- Same message once more.
- ~ 5sec delay.
- The graph is displayed.

I'm struggling to identify the cause.

It seems not to be a problem in the SQL query or drawing the graph. If I add a button to repeat the query it redraws the graph instantly.

The graph has 4 lins, each with about 40 points.

Every time I deploy this flow the Mysql node status is "not yet connected" & I get this error on the node-red-dashboard node (ui\_base)

 ![Untitled 1](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/b/cb8847b093edf505350a849db17e757c477e939f.jpeg)

A snippet of the Node-red log:

```auto
6 Dec 17:26:40 - [info] Starting flows
6 Dec 17:26:40 - [error] [ui_base:70ea48b6c7ce5aec] TypeError: Cannot read properties of undefined (reading 'replace')
6 Dec 17:26:40 - [info] [cronplus:8ee84f7bf63b1027] createTask - [truncated irrelevant]
6 Dec 17:26:40 - [info] Started flows
6 Dec 17:26:40 - [error] [mysql:b558a28a8cbd9b7e] Database not connected
6 Dec 17:26:40 - [info] [mqtt-broker:754230cc.99c44] Connected to broker: mqtt://localhost:1883

```

Can anyone suggest where to look for the cause?

---

<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: [6 December 2022 18:49 UTC](https://discourse.nodered.org/t/connection-lost-on-a-specific-dashboard-tab/71780/2 "2022-12-06T18:49:02Z")

</div>

> Every time I deploy this flow the Mysql node status is "not yet connected"

Because your inject node will inject immediately after deploy before the mysql node is actually connected ?

---

<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: [6 December 2022 19:04 UTC](https://discourse.nodered.org/t/connection-lost-on-a-specific-dashboard-tab/71780/3 "2022-12-06T19:04:48Z")

</div>

Yes, that probably explains that, so it's not a symptom of the actual problem.

---

<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: [5 January 2023 19:05 UTC](https://discourse.nodered.org/t/connection-lost-on-a-specific-dashboard-tab/71780/4 "2023-01-05T19:05:34Z")

</div>

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