Timeout Clarification (All 5 of them)

R

R3al1ty

ASP.NET, Windows Forms, Web Services

WebService Proxy Timeout = 100secs
WebService Asmx = Unlimited?
IIS ASP ScriptTimeout = 90secs
IIS ASP.NET Execution Timeout = 110secs
SQL CommandTimeout = 30secs

I've been running tests to see where these number hit, based on my
analysis:

1. SmartClient calling a webservice. Even if the webservice takes
ages, the client times out at 100 secs. The service will continue
executing on the server to completion however long it takes:

Question: Is there a way to terminate the server execution when the
client timesout so that it is a consistent user experience and so that
it doesnt lock up resources on the server?

2. Does the IIS ASP ScriptTimeout have any effect?

3. With httpRuntime execTimeout set to 10secs, if I put an infinite
loop in an ASP.NET page, should the behaviour be that it shows a
timeout after ~10secs and the page execution on the server is killed?

4. Given the default values above, what should these be changed to for
best performance?

Thanks for the clarifications and I hope this can clear up any
confusion for a lot of folks too.
 
?

=?ISO-8859-1?Q?G=F6ran_Andersson?=

R3al1ty said:
ASP.NET, Windows Forms, Web Services

WebService Proxy Timeout = 100secs
WebService Asmx = Unlimited?
IIS ASP ScriptTimeout = 90secs
IIS ASP.NET Execution Timeout = 110secs
SQL CommandTimeout = 30secs

I've been running tests to see where these number hit, based on my
analysis:

1. SmartClient calling a webservice. Even if the webservice takes
ages, the client times out at 100 secs. The service will continue
executing on the server to completion however long it takes:

Question: Is there a way to terminate the server execution when the
client timesout so that it is a consistent user experience and so that
it doesnt lock up resources on the server?

You could store the start time in a variable, so that you can check
periodically if the execution takes too long.

You could also start a timer that triggers after a given time, so that
you could stop the main thread if it has gotten out of hand. Killing a
thread is not the first choise, though, if there are any alternatives.
If you plan to kill a thread, it should catch the TreadAbortException so
that it can do any neccesary cleanup.
2. Does the IIS ASP ScriptTimeout have any effect?

Yes, on ASP pages. Not on ASP.NET pages.
3. With httpRuntime execTimeout set to 10secs, if I put an infinite
loop in an ASP.NET page, should the behaviour be that it shows a
timeout after ~10secs and the page execution on the server is killed?
Yes.

4. Given the default values above, what should these be changed to for
best performance?

The timeouts are intended to protect the server from code that perform
poorly. If you have performance problems, the problems are in the code,
not in the timeout settings.
 
R

R3al1ty

Thanks Göran! Can you also shed some light on the issue below?

ExhibitA:

protected void Page_Load(object sender, EventArgs e)
{
Thread.Sleep(100000);



}


ExhibitB:

protected void Page_Load(object sender, EventArgs e)
{
WebService.Service ws = new WebService.Service();
ws.Timeout = 150000;
ws.HelloWorld();
}


In both cases, the httpRuntime.executionTimeout is set to 20 seconds.
For CaseA, it times out as expected, for CaseB, the page continues to
load for 150 seconds until the web service call times out. Is this
normal?
 

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

Top