Search code examples
socketsazureload-balancingazure-service-fabric

Azure Load Balancer keeps socket on server side open after timeout


The timeout documentation says that the client receives an error when the clients sends data to the load balancer.

When the connection is closed, your client application may receive the following error message: "The underlying connection was closed: A connection that was expected to be kept alive was closed by the server."

But our service-fabric endpoint still has that tcp socket open that already timed-out, even for days now.

The client just sent a TCP CLOSE after the timeout was already applied.

Why does the load balancer not inform the service fabric node that tcp connection was closed because of timeout?

Can the windows OS on the service fabric node close the socket after a timeout of no activity? Found a TCP Keep-alive documentation, be tcp-keepalive feature is currently not usable by our application.


Solution

  • Load Balancer does not send TCP RST when sessions are idle timed out. Please investigate with Service Fabric how to manage this scenario and enable sending of TCP keep-alives.