# Node RED OPC UA connection auto close for browse node

**URL:** <https://discourse.nodered.org/t/node-red-opc-ua-connection-auto-close-for-browse-node/47006>\
**Category:** Industrial\
**Created:** [11 June 2021 03:05 UTC](https://discourse.nodered.org/t/node-red-opc-ua-connection-auto-close-for-browse-node/47006 "2021-06-11T03:05:39Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![anilkamaraju84](https://avatars.discourse-cdn.com/v4/letter/a/b5ac83/32.png) [@anilkamaraju84](https://discourse.nodered.org/u/anilkamaraju84)\
**Post date:** [11 June 2021 03:05 UTC](https://discourse.nodered.org/t/node-red-opc-ua-connection-auto-close-for-browse-node/47006/1 "2021-06-11T03:05:39Z")

</div>

Hi, Is there any default mechanism that Node-RED auto closes the connection opened by the browse node?

As per the source code mentioned here [node-red-contrib-opcua/103-opcuabrowser.js at 1f7d4c7f22e97e5a09eaba2185720ec365375b13 · mikakaraila/node-red-contrib-opcua · GitHub](https://github.com/mikakaraila/node-red-contrib-opcua/blob/1f7d4c7f22e97e5a09eaba2185720ec365375b13/opcua/103-opcuabrowser.js)  
only the session is getting closed rather than the connection which is causing more open connections.

Can someone throw some light here that is there any default connection timeout settings that can be applied here? Or is it the only way to programmatically close the connection?

Thanks in advance for your help.

---

<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:** [11 June 2021 12:48 UTC](https://discourse.nodered.org/t/node-red-opc-ua-connection-auto-close-for-browse-node/47006/2 "2021-06-11T12:48:15Z")

</div>

Hi. This is something you will probably need to ask in the GitHub issues pages for that node.

---

<div class="post-metadata">

**Author:** ![anilkamaraju84](https://avatars.discourse-cdn.com/v4/letter/a/b5ac83/32.png) [@anilkamaraju84](https://discourse.nodered.org/u/anilkamaraju84)\
**Post date:** [13 June 2021 02:25 UTC](https://discourse.nodered.org/t/node-red-opc-ua-connection-auto-close-for-browse-node/47006/3 "2021-06-13T02:25:15Z")

</div>

Hi @Steve-Mcl - I have mentioned the Github link just for reference. The prime ask is still the same .  
" Is there any default mechanism that Node-RED auto closes the connection opened by the browse node" **OR**" Any specific reason why the connection opened by the browse node is not auto closed?

---

<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:** [13 June 2021 08:13 UTC](https://discourse.nodered.org/t/node-red-opc-ua-connection-auto-close-for-browse-node/47006/4 "2021-06-13T08:13:51Z")

</div>

> [@anilkamaraju84](#):
>
> Is there any default mechanism that Node-RED auto closes the connection opened by the browse node

Node-red has a `close` event that is called when a node is re-deployed or removed but not an auto close event. Ultimately though, it would depend on the contrib nodes' author writing the appropriate code to close this connection (assuming that is the real issue).

> [@anilkamaraju84](#):
>
> Any specific reason why the connection opened by the browse node is not auto closed

Possibly a design decisions or an oversight by the contrib nodes' author.

In short, this is something the nodes author needs to answer. If you haven't already, then I suggest you raise this as an issue on the GitHub issues pages for that node

---

<div class="post-metadata">

**Author:** ![mikakaraila](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mikakaraila/32/37496_2.png) [@mikakaraila](https://discourse.nodered.org/u/mikakaraila)\
**Post date:** [30 June 2021 18:50 UTC](https://discourse.nodered.org/t/node-red-opc-ua-connection-auto-close-for-browse-node/47006/5 "2021-06-30T18:50:11Z")

</div>

Client will open session and it contains parameters like session timeout but also keepalive flag. Keepalive will keep session open even there is not other activity. Session that uses subscription it is needed to keep it open with keepalive as there can be longer time without any value updates.

---

<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:** [29 August 2021 18:50 UTC](https://discourse.nodered.org/t/node-red-opc-ua-connection-auto-close-for-browse-node/47006/6 "2021-08-29T18:50:20Z")

</div>

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