Server.ScriptTimeout not being observed?

  • Thread starter Thread starter Mark
  • Start date Start date
M

Mark

Hi...

We have a utility page that some users are having trouble with. The page
sets Server.ScriptTimeout = 600; // 10 minutes

yet it reports a timeout error after the default 90 seconds.

The page the users are seeing is compiled in Release mode and
compilation/@debug="false" in web.config.

The page is a POST and takes a bit over a meg of input in viewstate and form
parameters.

Is there any reason why Server.ScriptTimeout would not be observed? I've
been googling for about an hour and see several people saying that they've
had the same problem but no good answers yet...

Thanks
Mark
 
Hi Mark,
We have a utility page that some users are having trouble with. The page
sets Server.ScriptTimeout = 600; // 10 minutes
yet it reports a timeout error after the default 90 seconds.

First, could you provide the exception description? There're lots of
timeout errors that is not caused by the limit of executionTimeout.
The page is a POST and takes a bit over a meg of input in viewstate and form
parameters.

Is it a simple postback? Do you access database during that postback?

I did a test but cannot reproduce this issue. Could you try following steps
to see if you still get request timeout after 90 seconds? It'd be a good
start for me to investigate this issue if I could find a way to reproduce
it.

1. Create a new ASP.NET Web Application in Visual Studio 2008 SP1.

2. Add following section in web.config:

<httpRuntime executionTimeout="600" />

3. Make sure the debug attribute is set to false:

<compilation debug="false">

4. Add following code in Page_Load:

protected void Page_Load(object sender, EventArgs e)
{
while(true)
Thread.Sleep(1000);
}

5. Right click Default.aspx in the solution explorer window, click "View in
Browser" to open the page in IE (tested in IE 7).

My environment is Windows Server 2008 Enterprise SP2 + IIS 7.

If the above steps works please tell me how to reproduce the problem. If
not, please provide your environment (OS and IIS version). I'll set up the
same environment to see if I could repro it.

Regards,
Allen Chen
Microsoft Online Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

Note: MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 2 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions. Issues of this
nature are best handled working with a dedicated Microsoft Support Engineer
by contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/en-us/subscriptions/aa948874.aspx
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Hi Allen...

Thank you for replying.
First, could you provide the exception description? There're lots of
timeout errors that is not caused by the limit of executionTimeout.

Our error log file just has
ASP.NET runtime error (System.Web.HttpException): Request timed out.
Is it a simple postback? Do you access database during that postback?

It's a postback with a few hundred variables and a viewstate approaching
1mb. When the page gets going, it does do numerous Sql Server queries, but
the errors we get aren't Sql Server timeouts.

As I said, our page sets Server.ScriptTimeout = 600, rather than using the
web.config executionTimeout setting; many of the posts I read on this kind of
problem seem to make this segue.

A user says Server.ScriptTimeout doesn't seem to be observed and the replies
say "set executionTimeout". The thing that puzzles me is why the replies
always make that segue. The value of Server.ScriptTimeout is that you can do
it on a page-by-page basis (at least theoretically) while executionTimeout is
global.

I found 1 thread saying that Server.ScriptTimeout doesn't get respected when
serializing large files for some reason. I thought 1+mb of input data might
also be hitting a similar issue (though the kb article on the output problem
indicated files > 10 mb).

Our environment is VS 2005/.Net 2.0, but I can try putting together a little
page to test the timing.

Thanks
Mark
 
Hi Mark,

Thanks for your reply.
Our environment is VS 2005/.Net 2.0, but I can try putting together a little
page to test the timing.

I also tested Server.ScriptTimeout:

protected void Page_Load(object sender, EventArgs e)
{
Server.ScriptTimeout = 600;
while (true)
Thread.Sleep(1000);
}

It still works. If you create a new project to test with the above code,
can you see the same behavior? Could you send me a demo that can reproduce
this issue? Please also provide the OS version and IIS version. My email is
(e-mail address removed) update here after sending the project in case I
missed that email.


Regards,
Allen Chen
Microsoft Online Support
 
Hi Mark,
Our environment is VS 2005/.Net 2.0, but I can try putting together a little
page to test the timing.

Have you sent me the project?

Regards,
Allen Chen
Microsoft Online Support
 
Back
Top