A
A
Andrey Simonov2014-09-23 12:59:25
IIS
Andrey Simonov, 2014-09-23 12:59:25

Why does a request hang between WCF services?

Hey!
There was a messaging problem between two WCF services.
One service sends a "long" request, and if the request time exceeds 260 seconds, it hangs. The amount of data transferred is minimal (less than 1kb), the type of request is not important (tried POST and GET)
This problem only occurs if the service that calls the request from another service is running on IIS 7.5. IIS 7.0 does not have this problem.
The code of the method being called.

[OperationContract]
    [WebGet(ResponseFormat = WebMessageFormat.Json, RequestFormat = WebMessageFormat.Json)]
    public GA_Output GA_Calc_GET(string id)
    {
      GA_Output dtr_obj = new GA_Output();
      try
      {
        WebOperationContext.Current.OutgoingResponse.Headers.Add("Access-Control-Allow-Origin", "*");

        Thread.Sleep(300000);

      }
      catch (Exception ex)
      {
        dtr_obj.ErrorResponse.SetError(ex);
      }

      return dtr_obj;
    }

Where to dig, IIS settings or web.config?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
Vitaly, 2014-09-24
@vipuhoff

The request takes more than 260 seconds, perhaps the system architecture should be reviewed, it is better to execute such requests asynchronously and take the result later. But in fact, in my experience, in order to minimize the number of "glitches" of IIS itself, it is better that the versions on both servers match, then it may not matter which version fails.

A
Andrey Simonov, 2014-09-24
@AntLogist

it is better that the versions on both servers match

That's the strength of WCF to set up communication between different systems.
On an asynchronous request, I agree with you, but I would like a simple solution to fix the error. In any case, it is important to understand where the bottleneck is and calculate the timeout based on it.
The service that sends the request is on an Azure VM. Could there be any timeouts other than IIS?

R
redmanmale, 2014-10-28
@redmanmale

Check connection timeouts in web.config.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question