6 Replies Latest reply on Apr 10, 2016 9:14 PM by ???-3 RSS
    ???-3 Explorer

    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

      • Re: How to keep EMS/Java alive without any Pings
        aanjan Heavyweight Champ

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

          • Re: How to keep EMS/Java alive without any Pings
            ravila Explorer

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

            • Re: How to keep EMS/Java alive without any Pings
              ???-3 Explorer

              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