Why is my web service returning "Operation Timed Out"?

0

I searched exhaustively in the forum StackOverflow (and also Google) some question similar to what is happening to me, but I did not find anything. So I decided to build this issue in the hope that someone in the community could help me.

Problem explanation:

I'm building an ASMX web service with three methods, as described below:

  • Method 1: Fast return - Accesses a database located on the server where IIS and the Web service are located. The return time is < 1s.
  • Method 2: Fast return - Accesses a database located on the server where IIS and the Web service are located. The return time is < 1s.
  • Method 3: Slow return - Accesses an external Web service that usually returns between 8 ~ 15 seconds.

I configured a program (perfomance.exe) to do a stress test on this same 3-button web service

  • Button 1: Starts a thread for method 1 (fast)
  • Button 2: Starts a thread for method 2 (fast)
  • Button 3: Starts a thread for method 3 (slow)

Scenarios tested

1st scenario:

I launched:

  • +30 threads for method 1 (fast)
  • +30 threads for method 2 (fast)

Result: OK

Comment: Application, Server and IIS behave perfectly to fit all requests.

2nd scenario:

I launched:

  • +10 threads for method 3 (slow)

Result: OK

Comment: Application, Server and IIS behave perfectly to fit all requests.

3rd scenario:

I launched:

  • +30 threads for method 1 (fast)
  • +30 threads for method 2 (fast)
  • +10 threads for method 3 (slow)

Result: The web service returns Operation Timed Out

Comment: When I start the Threads for method 3 together with the threads for methods 1 and 2, it is as if the requests were late in relation to method 3.

4th scenario:

I launched two instances of the performance.exe executable:

At first:

  • +30 threads for method 1 (fast)
  • +30 threads for method 2 (fast)

In the second:

  • +10 threads for method 3 (slow)

Result: OK

Comment: Application, Server and IIS behave perfectly to fit all requests.

5th scenario:

Two instances of the performance.exe executable:

At first:

  • +30 threads for method 1 (fast)
  • +30 threads for method 2 (fast)

In the second:

  • +30 threads for method 1 (fast)
  • +30 threads for method 2 (fast)
  • +10 threads for method 3 (slow)

Result of the first instance of the executable: OK

Result of the second instance of the executable: The web service returns: Operation Timed Out

Some questions I have:

  • Why does this happen only when I make the request from the same executable?
  • Is there any server-side configuration to avoid this type of timeout?
  • Is there an exception in which I can capture this type of timeout?

My fear is that some client will reproduce the error scenarios listed above in their implementation and I do not know how to deal with this, as there appears to be a server-side error.

    
asked by anonymous 29.05.2018 / 21:39

0 answers