Sleeping Thread - impact on web site

M

Mark

We are building a public web application that calls a web service on an
internal box. The web service runs for 5-10 minutes, does some heavy
processing, and writes to a database when it is complete. The current design
calls for having the web application's thread sleep for 10 seconds, then
check the database to see if the web service is complete. If the database
claims the web service has completed, it then displays the results from the
database.

There are a number of ways to solve this problem, but I'm wondering what the
true impact of having the thread sleep on overall performance and
availability of our production web server that hosts many other
applications. Obiviously the thread isn't doing anything, but it still is
tying up a thread. Is this a big deal? Is there a way to quantify or
measure its impact and/or determine how far it would scale?

Thanks in advance.

Mark
 
G

George Ter-Saakov

Web Application threads are limited in quantity. I think by default there
are only 100 of them per processor.
If there are more calls than that ASP.NET throws "Server Busy" error.

So if you hanging those threads for 5-10 minutes you have pretty good
chances to run out of them very fast.
-----------------------------------------------------
I would recommend pulling. The client (browser) shows "Processing....." and
refreshes screen very second or so. As soon as database shows that request
was processed it redirects to normal page.

It's easy to do with Ajax method then client will not even see browser
refreshing.


George.
 
G

Guest

Very simply, a sleeping thread means it is tied up and unable to service
other requests, so yes there will certainly be an impact.
Have you looked into using the asynchronous versions of your WebMethods
(e.g. BeginXXX / EndXXX) ?
Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top