What can cause a two minute delay when calling a web service?

We have a .NET 3.5 application that calls a web service on a server. In almost every installation of this application, the entire request / response process takes about half a second.

In one particular installation, these queries mysteriously take almost exactly 85 seconds (in half a second).

My first thought was that the webservice client rebuilt the XML serialization assembly every call, but even sending a hard-coded xml file still takes almost exactly the same amount of time. Monitoring network traffic seems to indicate that the actual sending of part of the transaction data occurs after a second. Therefore, the problem is all on the client side.

Is there some kind of permission delay that could cause this problem?

Edit (in more detail): The
application is the basic shell of webservice requests - enter some parameters, send the request to the web service and get a response. We started with the client code created using the wsdl.exe tool, but also tried to just use HttpWebRequest directly when we encountered problems. Following the logs and network traces, the flow is as follows:

T 0:00 - user initiates request
T 1:24 - the application sends request to server
T 1:25 - the client receives the response and displays to the user.
+3
source share
5 answers

. . , - -, HttpWebRequest , , WebRequest, - .

, KB: http://support.microsoft.com/kb/968699

app.config:

<configuration>
    <system.net>
        <defaultProxy >
            <!-- Disable Autoproxy-->
            <proxy autoDetect="false"/>
        </defaultProxy>
    </system.net>
</configuration> 
+3

, 85 , , ? 85 ?

, ( ) , - - . - . , ? - . , , HTTP ftp- .

?

+1

. - ? - HTTP , ? , , , .

+1

.NET, . web.config :

 <system.diagnostics>
        <sources>
            <source name="System.ServiceModel"
                    switchValue="Information, ActivityTracing"
                    propagateActivity="true">
                <listeners>
                    <add name="traceListener"
                        type="System.Diagnostics.TextWriterTraceListener"
                        initializeData="c:\temp\Traces.txt"  />
                </listeners>
            </source>
        </sources>
    </system.diagnostics>

This will track any activity of "System.ServiceModel", which is a web services in 3.5

0
source

Use a program such as wirehark to sniff the network when executing a query. First at the client and if you are still in the dark on the server. (both at the same time provide even more understanding).

This way you can eliminate tcp-ip retransmissions, authentication problems, proxy weirdness, etc. etc.

0
source

Source: https://habr.com/ru/post/1714321/


All Articles