question

Upvotes
Accepted
4 2 5 10

Websocket connection disconnecting after ping

Normally our application makes a connection via websocket and periodically we receive pings about every 20 seconds or so.


Starting on June 2nd, 2022 when our application makes a connection we receive the ping about every 20 seconds but directly after the ping we get disconnected. The websocket is closed and our apps tries to reconnect. It does, then the ping disconnect action starts to take place again. We do receive price updates in between while we are connected. This repeated action goes on for about over 30 minutes or so before our applications stops receiving updates or pings.


  • Any idea what may be going wrong?
  • Did anything change in early June?
  • Would you be able tell what you are seeing form our connection during this ping/disconnect phase?
websocketsping
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvote
Accepted
27.5k 67 18 14

Hello @Nana

The Refinitiv Real-Time WebSocket API Ping-Pong messages are the message-level heartbeat, not the packet-level heartbeat frame. The Ping-Pong messages structures are as follows:

{"Type":"Ping"}

{"Type":"Pong"}

I have checked the nv-websocket-client API document page and the sendPong() method seems to use for sending a pong frame which is the packet-level heartbeat to the server.

Does the issue occur If you change the code to send a pong message ({"Type":"Pong"}) as text?

I highly recommend you contact the RTO support team directly to verify on the server side.
You can submit a ticket to them via https://my.refinitiv.com/content/mytr/en/helpandsupport.html website.

rrto-ticket.png


rrto-ticket.png (22.1 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
32.2k 41 11 20

Hello @Nana ,

To engage the server-side team, and to confirm if any error insight is in the server side logs on the connection, would suggest opening a case with Refinitiv Helpdesk Online -> Product -> Refinitiv Real-Time Optimized

As a sanity check, is the issue reproducible with Websocket example from Websocket RDP Examples on GitHub, does the simple single RIC subscription example connects and behaves the same as the custom app?

Does another machineID from your organization experience the same issue, especially running the simple example code without any modifications?

These should help narrow down the issue that you observe.

No, there were no changes in early June that can explain what you describe.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
4 2 5 10

Presently from what we can tell the issue of shutdown appears to occur at a certain point after we send a pong back. In our code we use the webscocket method .sendPong() in order to send the send the pong back. In the sample code it uses the sendText() method to send the pong.

The sendPong() method has been working for about 2-years. Now when we altered the sample code to use sendPong() instead of sendText() the disconnection error on pong showed up.

Any idea what may have changed to cause this?

I attempted the helpdesk forum and the ticket did not appear to submit each time I tried.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.