tags:

views:

156

answers:

1

Hi,

I have a web service slowdown. My (web) service is in gsoap & managed C++. It's not IIS/apache hosted, but speaks xml. My client is in .NET The service computation time is light (<0.1s to prepare reply). I expect the service to be smooth, fast and have good availability. I have about 100 clients, response time is 1s mandatory. Clients have about 1 request per minute. Clients are checking web service presence by tcp open port test. So, to avoid possible congestion, I turned gSoap KeepAlive to false. Until there everything runs fine : I bearly see connections in TCPView (sysinternals)

New special synchronisation program now calls the service in a loop. It's higher load but everything is processed in less 30 seconds. With sysinternals TCPView, I see that about 1 thousands connections are in TIME_WAIT. They slowdown the service and It takes seconds for the service to reply, now.

Could it be that I need to reset the SoapHttpClientProtocol connection ? Someone has TIME_WAIT ghosts with a web service call in a loop ?

A: 

Sounds like you aren't closing the connection after the call and opening new connections on each request. Either close the connection or reuse the open connections.

Robert MacLean
I agree. I wish the KeepAlive=false on server side, but on client side, .NET seems to prefer recycling by default.I found this solution :http://yakkowarner.blogspot.com/2008/11/calling-web-service-in-loop.htmlBut It looks heavy. I'm trying that one :http://forums.asp.net/t/1003135.aspx