Endelm
asked on
C# - Stress testing a Web Service - Timeout
Hi,
I have a web service that is query'ing a database. The query takes a few seconds to run.
I'm stress testing my web service using a couple of threads.
If the interval is too short between the threads that execute the web service, I get the following exception.
System.Web.Services.Protoc ols.SoapEx ception: Server was unable to process request. ---> Error fetching *MyWebserviceMethods*.
at System.Web.Services.Protoc ols.SoapHt tpClientPr otocol.Rea dResponse( SoapClient Message message, WebResponse response, Stream responseStream, Boolean asyncCall)
Any ideas why this is happening? I thought web services can handle some load.
Thank you.
I have a web service that is query'ing a database. The query takes a few seconds to run.
I'm stress testing my web service using a couple of threads.
If the interval is too short between the threads that execute the web service, I get the following exception.
System.Web.Services.Protoc
at System.Web.Services.Protoc
Any ideas why this is happening? I thought web services can handle some load.
Thank you.
How are you calling the web service method?
ASKER
I'm using a while loop and 3 threads.
I execute the 3 threads at the same time.....then sleep for 1 sec.....then run the 3 threads again, etc.
If I set the threads to sleep for 5 or 10 seconds I don't get this error.
The execution of each web service call takes a few seconds.
Thank you.
I execute the 3 threads at the same time.....then sleep for 1 sec.....then run the 3 threads again, etc.
If I set the threads to sleep for 5 or 10 seconds I don't get this error.
The execution of each web service call takes a few seconds.
Thank you.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Interesting.
What does this do and how is it different from what I was doing?
Thank you! :)
What does this do and how is it different from what I was doing?
Thank you! :)
If you call your web service method's xxxAsync version, it will automatically occur on its own thread; thus, preventing blocking. However, if you wish to perform any action(s) upon the completion of the method call, you have to subscribe to its xxxCompleted event.
So in other words, "asynchronous" means that each call to the web service will occur on its own thread, and thus should not interfere with each other.
You pretty much have it with that statement.