[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

C# Web Service timeout

Posted on 2007-11-20
8
Medium Priority
?
12,359 Views
Last Modified: 2013-11-07
Hi,

I created a console application to load test my web service. I created 10 threads that I execute at the same time.

Each web service thread queries a database with a query that takes 2-3min.

When I start the 10 threads and wait for around 5min, my testing programI gets a time out exception:

System.Net.WebException: The operation has timed out
   at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest request)
   at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest request)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
..
..

Is this normal? Is it possable to extend this timeout in the web service?

Thank you! :P
0
Comment
Question by:Endelm
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 40

Accepted Solution

by:
evilrix earned 500 total points
ID: 20320473
0
 
LVL 21

Assisted Solution

by:surajguptha
surajguptha earned 500 total points
ID: 20320475
Check this article about increasing timeouts
http://www.thescripts.com/forum/thread628561.html
0
 
LVL 7

Assisted Solution

by:badbearontour
badbearontour earned 500 total points
ID: 20320780
Theres a possible change tot he webconfig file you could try. its detailed here

http://www.sitepoint.com/article/web-config-file-demystified

its something like application_timeout.

its usually set at 5 mins, you oculd try ectending it.

In reality though I would probably try using asynchronous calls to the webservice, as 2-3 minutes is a long time for a query to run

Good Luck

BB
0
Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

 
LVL 7

Expert Comment

by:badbearontour
ID: 20320789
Sorry its called

   <httpRuntime appRequestQueueLimit="100" executionTimeout="600" />

BB
0
 
LVL 40

Expert Comment

by:evilrix
ID: 20321211
Um, all of which is documented in the very first link to that I posted -- in detail!
0
 
LVL 37

Assisted Solution

by:gregoryyoung
gregoryyoung earned 500 total points
ID: 20321894
I think a better question is what on earth are you doing in a webservice call that takes 5 minutes?!?!?!

I think you may be looking at a bad architecture here ... This sounds like something that should be done asynchronously i.e.

I call the WebService to request this thing to be done ...
The webservice writes the job say to a table returns me a unique ID of the task I just requested ... (it is telling me that the task will be run in the future).
Another process picks up the job out of that table and processes it (setting when it is completed)
I can then ask the webservice the status of the task *OR* I can tell the webservice a local webservice where it can call me to tell *me* that the task has been completed ...
I ask the webservice for the results (or this is combined with it telling me the job is done)


This introduces queuing to the system and allows it to be processed by some other back end processor. This is important because what happens if the webservice restarts? The tasks will still run .... if the back end processor is restarted it will continue working where it left off.

What happens if 500 calls are made concurrently (this could qualify as a DoS attack) haviong the webservice do this directly would be a disaster (500 concurrent tasks). The queuing here limits the number of concurrent jobs to be run (it is simply a configuration point of the back end processor).

The queuing provides a full transactional log of every request that has been processed (and could even link to the results returned) ... not a big deal to implement otherwise but it comes for free ...


0
 
LVL 1

Expert Comment

by:Computer101
ID: 20521763
Forced accept.

Computer101
EE Admin
0

Featured Post

What’s Wrong with Your Cloud Strategy ?

Even as many CIOs are embracing a cloud-first strategy, the reality is that moving to the cloud is a lengthy process and the end-state is likely to be a blend of multiple clouds—public and private. Learn why multicloud solutions matter in this webinar by Nimble Storage.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question