cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

How to keep EMS/Java alive without any Pings

???-31
7-Bedrock

How to keep EMS/Java alive without any Pings

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

ACCEPTED SOLUTION

Accepted Solutions
Aanjan
12-Amethyst
(To:???-31)

駿介 山辺, can you try changing/ increasing your idle ping rate on the WSCommunicationSubsystem as well? I believe it is set to 45 seconds by default.

View solution in original post

6 REPLIES 6
Aanjan
12-Amethyst
(To:???-31)

駿介 山辺, can you try changing/ increasing your idle ping rate on the WSCommunicationSubsystem as well? I believe it is set to 45 seconds by default.

ravila
1-Visitor
(To:Aanjan)

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 ...

Aanjan
12-Amethyst
(To:ravila)

Rick, you can set it via the ClientConfigurator class. You can set the idle ping rate and the ping timeout.

ravila
1-Visitor
(To:Aanjan)

A+

configurator.setIdlePingRate and configurator.setConnectTimeout

Aanjan
12-Amethyst
(To:ravila)

Yep, that should do it! On a side note, the entire API reference documentation is available at the same link as well.

???-31
7-Bedrock
(To:Aanjan)

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

Announcements


Top Tags