Skip to main content
15-Moonstone
December 18, 2019
Question

Number of active tunnels are accumulated gradually

  • December 18, 2019
  • 1 reply
  • 2468 views

Hi,

 

The system is still working, however the number of active tunnels keep going up and never down since yesterday. The GetActiveTunnels also returns the same result.

 

20191218_Tunnel_issues_1.png

 

I don't know what's going on, any advice would be really appreciated!

 

My Bests,

Hung Tran

 

 

 

 

 

 

1 reply

Support
December 20, 2019

HI @htran-21.

 

Can you provide more details on the use case?  It appears the tunnels are being kept open for the max amount of time resulting in a timeout.  Which version of ThingWorx are you running?

 

Regards.

 

--Sharon

htran-2115-MoonstoneAuthor
15-Moonstone
December 20, 2019

Hi Sharon,

 

This is a timeout issue. While the server is under load, tunnel communication might take longer than 10 seconds and a timeout occurred. In that event, server still keeps the tunnel session in the Active list while that's already disconnected.

 

Edge logs

 

{"level":"FORCE","timestamp":"2019-12-17T11:48:00,664","origin":"SDK","content":"TUNNEL CREATED. Entity: IPU_TEST, tid: 71d70bae-2994-4ebe-a971-efa2362f3dfb, target: 127.0.0.1:5900"}
{"level":"FORCE","timestamp":"2019-12-17T11:48:10,466","origin":"SDK","content":"TUNNEL STARTED. Entity: IPU_TEST, tid: 71d70bae-2994-4ebe-a971-efa2362f3dfb, target: 127.0.0.1:5900"}
{"level":"FORCE","timestamp":"2019-12-17T11:48:11,406","origin":"SDK","content":"TUNNEL ENDED. Entity: IPU_TEST, Peer: TEST, tid: 71d70bae-2994-4ebe-a971-efa2362f3dfb, target: 127.0.0.1:5900"} 

 

 

and server logs

 

2019-12-17 11:48:11.556-0600 [L: ERROR] [O: c.t.w.t.WSTunnelServer] [I: ] [U: ] [S: ] [T: http-nio-0.0.0.0-443-exec-820] Error occurred in web socket: An existing connection was forcibly closed by the remote host 

 

 

I bet that when the local socket read timeout (Default is 10 seconds) occurs, the tunnel is immediately ended. While it should give a few chances before terminating the tunnel. The current implementation is causing a lot of issues while the server is under load.

 

My Bests,

Hung Tran

Support
December 20, 2019

Hi @htran-21.

 

Please provide the ThingWorx version.