Home Help Center

TCP/IP Connection establishment and detection of broken connection taking long time

ishwar_jindalishwar_jindal Member Ishwar JindalOrganization: Royal Bank of ScotlandProject: Real time notification between java and C# server
We have a window service written in .NET 2.0. Window service takes request from .NET/Java clients and send response using TCP/IP connection. The application was working quite well for the last 5 years but for some unknown reason we have started getting issues with ICE connections in last 4 months

(The client themselves are also servers i.e. clients are not windows UI or a Java UI)

We are using ICE in .NET windows server. Some of the .NET/Java Clients are on and some one 3.2.X.X.

we are facing two issues but looks like both are inter-related

A) Lets say for some reason the TCP/IP connection with client is broken. When the internal workflow of window service determines that it needs to send some response to client (i.e broken client) then ICE runtime sometime takes 2 minutes to complete the whole operation i.e. 2 minutes from when window service tell ICE proxy to call the client's callback method to the state where ICE runtime return ICE.ConnectionRefusedException (or ICE.ConnectionLostException). For our workflow every millisecond matters and this 2 minute delay is real blocker

B) Lets say everything related to TCP/IP connection with client is ok. When the internal workflow of window service determines that it needs to send some response to client (i.e active client) then ICE runtime sometime takes 30 seconds to establish a TCP/IP connection. We have enabled both tracing i.e. ThreadPool, Network.

From the time we handover to ICE rutime to call the proxy, I see below in server logs

2012-07-31 14:31:02,860 [ManagedPoolThread #72] INFO <myNamespace> - CLIENT CALLBACK STARTED : Calling back client tcp -h -p 3164

2012-07-31 14:31:32,125 [ManagedPoolThread #72] DEBUG <myNamespace>.IceHandler+CustomIceLogger - ICE network trace: trying to establish tcp connection to

I have checked couple of post in forums re slow connection. Client use -h and specify our server Name and port number and in server side also (as you can see in logs) we have client's address and port

The only things which has changed in last 4 months is
1) We have implemented ICE facet i.e. we stated supporting multiple versions of API by asking client to pass us the facet string
2) Tracing was enabled (but just to find out what is happening inside ICE runtime)
3) Number of clients have doubled.

We really wanted to understand how to make ICE runtime respond fast in establishing TCP/IP connections and detecting lost connection on calling broken proxies.

Sign In or Register to comment.