Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X
Hi,
I would like to keep Remote thing alive more than 55 sec (at least 1 hour ~ 1 day) without any PINGs.
How can I realize this feature?
I tried set...
EMS#pingRate: 300000 (5 mins)
WSCommunicationsSubsystem#Idle Connection Timeout: 3600 (1 hour)
but for each time EMS pings to the PF, WSConnection closes by error and Re-Connect attempt occurs.
Regards,
S.Yamabe
Solved! Go to Solution.
駿介 山辺, can you try changing/ increasing your idle ping rate on the WSCommunicationSubsystem as well? I believe it is set to 45 seconds by default.
駿介 山辺, can you try changing/ increasing your idle ping rate on the WSCommunicationSubsystem as well? I believe it is set to 45 seconds by default.
as suggested, and made these settings on the platform:
Websocket Communication Settings
Idle Connection Timeout (sec)
3660
Idle Ping Rate (secs)
1260
Amount of time to wait for authentication message (secs)
61
Amount of time a request will wait for the response message before timing out (secs)
61
Asynchronous edge dispatching configuration
Max Thread Count
10
Client Endpoints
Endpoint Name Endpoint URI Max Endpoint Connections Idle Ping Rate (secs) Application Key
however on my java ems side, I still see a pong happening every 45 seconds,
What do I need to do on the ems side to bind to the platform settings?
03:00:38.839 [NettyClient-NIO-1] DEBUG c.t.c.c.c.n.ThingworxClientConnectionHandler - [ClientHandler: 779616668] PONG has been received
03:01:13.895 [NettyClient-NIO-1] DEBUG c.t.c.c.c.n.ThingworxClientConnectionHandler - [ClientHandler: 876343241] Client has been idle, sending websocket ping with timeout 10000 ...
03:01:13.895 [NettyClient-NIO-1] DEBUG i.n.h.c.h.w.WebSocket08FrameEncoder - Encoding WebSocket Frame opCode=9 length=0
03:01:13.957 [NettyClient-NIO-1] DEBUG i.n.h.c.h.w.WebSocket08FrameDecoder - Decoding WebSocket Frame opCode=10
03:01:13.957 [NettyClient-NIO-1] DEBUG i.n.h.c.h.w.WebSocket08FrameDecoder - Decoding WebSocket Frame length=0
03:01:23.903 [NettyClient-NIO-1] DEBUG c.t.c.c.c.n.ThingworxClientConnectionHandler - [ClientHandler: 1289720563] PONG has been received
03:01:58.957 [NettyClient-NIO-1] DEBUG c.t.c.c.c.n.ThingworxClientConnectionHandler - [ClientHandler: 876343241] Client has been idle, sending websocket ping with timeout 10000 ...
03:01:58.957 [NettyClient-NIO-1] DEBUG i.n.h.c.h.w.WebSocket08FrameEncoder - Encoding WebSocket Frame opCode=9 length=0
03:01:59.017 [NettyClient-NIO-1] DEBUG i.n.h.c.h.w.WebSocket08FrameDecoder - Decoding WebSocket Frame opCode=10
03:01:59.017 [NettyClient-NIO-1] DEBUG i.n.h.c.h.w.WebSocket08FrameDecoder - Decoding WebSocket Frame length=0
03:02:08.967 [NettyClient-NIO-1] DEBUG c.t.c.c.c.n.ThingworxClientConnectionHandler - [ClientHandler: 750800938] PONG has been received
03:02:44.018 [NettyClient-NIO-1] DEBUG c.t.c.c.c.n.ThingworxClientConnectionHandler - [ClientHandler: 876343241] Client has been idle, sending websocket ping with timeout 10000 ...
Rick, you can set it via the ClientConfigurator class. You can set the idle ping rate and the ping timeout.
A+
configurator.setIdlePingRate and configurator.setConnectTimeout
Yep, that should do it! On a side note, the entire API reference documentation is available at the same link as well.
Aanjan,
Thanks for your advice.
It worked with 3600 sec of pingRate.
For my case, network layer was also a problem.
It checks idle sessions and disconnect which continues idling for 3 min.
S.Yamabe