Real-time optimize / "The connection closed with error: Connection reset by peer"

"post this question on behalf of my client"

the client has been disconnecting from Real-time-optimize a few times a day. The error message is "The connection closed with error: Connection reset by peer ", please see the logs below;


Does anyone knows what causes the issue and how to solve it?

__________________________________

Please refer to the logs below for the disconnection we experienced in the past week with timestamp. The disconnection issue is happening on a daily basis so it didn’t worked perfectly. The API was written in Scala.

021-08-23 19:01:50,924 SGT ERROR [akka.actor.SupervisorStrategy] - The connection closed with error: Connection reset by peer

2021-08-24 21:31:25,617 SGT ERROR [akka.actor.SupervisorStrategy] - The connection closed with error: Connection reset by peer

2021-08-26 05:09:29,699 SGT ERROR [akka.actor.SupervisorStrategy] - The connection closed with error: Connection reset by peer

2021-08-26 12:01:01,456 SGT ERROR [akka.actor.SupervisorStrategy] - The connection closed with error: Connection reset by peer

2021-08-26 14:03:15,459 SGT ERROR [akka.actor.SupervisorStrategy] - The connection closed with error: Connection reset by peer

2021-08-26 18:18:50,249 SGT ERROR [akka.actor.SupervisorStrategy] - The connection closed with error: Connection reset by peer

2021-08-27 18:35:45,415 SGT ERROR [akka.actor.SupervisorStrategy] - The connection closed with error: Connection reset by peer

Best Answer

  • nick.zincone
    nick.zincone admin
    Answer ✓

    Hi @tomoko.nasuho

    One possible thing to look into is how the application is dealing with Ping/Pong messages. Applications can rely on the Ping message sent by RTO and respond with a Pong message to keep the connection alive. The potential issue with this is if the application contains a large watchlist of very active items, the Ping message sent by RTO may be queued up and by the time the application is ready to process it, RTO may disconnect because the application did not respond in a timely matter.

    Alternatively, applications can utilize the “PingTimeout” attribute within the Login response to send the required Pong message.

Answers

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    @tomoko.nasuho

    From the error (Connection reset by peer), it looks like the RTO cut the connection.

    It is better to contact the RTO team to verify if the RTO cut the connection.