# Node-red dashboard socket.io transports change

**URL:** <https://discourse.nodered.org/t/node-red-dashboard-socket-io-transports-change/48769>\
**Category:** Dashboard\
**Created:** [22 July 2021 11:07 UTC](https://discourse.nodered.org/t/node-red-dashboard-socket-io-transports-change/48769 "2021-07-22T11:07:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![khw](https://avatars.discourse-cdn.com/v4/letter/k/ecd19e/32.png) [@khw](https://discourse.nodered.org/u/khw)\
**Post date:** [22 July 2021 11:07 UTC](https://discourse.nodered.org/t/node-red-dashboard-socket-io-transports-change/48769/1 "2021-07-22T11:07:08Z")

</div>

hi guys  
my dashboard appears connection lost blink.

I pressed F12 on chrome  
when lost connection I saw [transport=polling] messages and [upgrade=websocket]  
so i want to change websocket way.

[socket.io](http://socket.io) verson 2.4

[socket.io](http://socket.io) documentation do this code " const socket = io ({ transports: ['websocket']}); "

> **[Client Initialization](https://socket.io/docs/v2/client-initialization/)**
>
> Once you have installed the Socket.IO client library, you can now init the client. The complete list of options can be found here. In the examples below, the io object comes either from: the

but i don't know where it change  
socket.js? manager.js?

please help me.

---

<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:** [22 July 2021 16:49 UTC](https://discourse.nodered.org/t/node-red-dashboard-socket-io-transports-change/48769/2 "2021-07-22T16:49:45Z")

</div>

You really do not want to do that.

Even a raw websocket connection uses http first and then "upgrades" to ws. [Socket.IO](http://Socket.IO) is a lot smarter and will typically start with the http request, and use polling until the upgrade happens where it switches. So you are not waiting for the ws server to upgrade your connection.

[Socket.Io](http://Socket.Io) does all the clever things for you and you don't want to mess with it when it is working as expected.

In any case, this is all embedded into Dashboard and Node-RED so messing is not really an option.

---

<div class="post-metadata">

**Author:** ![khw](https://avatars.discourse-cdn.com/v4/letter/k/ecd19e/32.png) [@khw](https://discourse.nodered.org/u/khw)\
**Post date:** [22 July 2021 23:59 UTC](https://discourse.nodered.org/t/node-red-dashboard-socket-io-transports-change/48769/3 "2021-07-22T23:59:12Z")

</div>

thank you.  
I want to solve dashboard connection lost.

I think sever is not response well and quickly.  
so dashboard lost connection

my node-red code has long process time because of o(n).  
I can't handle it

I try to disable auto tab discard on chrome.  
but it failed

do you have any solution?

/\* dashboard version 2.30  
/\* node-red version 1.3.5  
/\* nodejs 14.x

---

<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:** [23 July 2021 18:52 UTC](https://discourse.nodered.org/t/node-red-dashboard-socket-io-transports-change/48769/4 "2021-07-23T18:52:29Z")

</div>

I don't use dashboard much.

However, check on your server to see how loaded it is.

What OS is your server? What hardware? What else is running on it?

If the server is on a Pi, are you running a Linux desktop on the same device? Worse still, are you using that desktop to access Dashboard? If so, ditch the desktop completely if you can, it is a real drain on resources. Access from a different device.

---

<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:** [22 August 2021 18:53 UTC](https://discourse.nodered.org/t/node-red-dashboard-socket-io-transports-change/48769/5 "2021-08-22T18:53:20Z")

</div>

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