By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,781 Members | 1,134 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,781 IT Pros & Developers. It's quick & easy.

Execution Timeout Problem

P: n/a
Our asp.net web app uses a .NET component (DLL) in the bin directory to call
several stored procedures back to back to perform updates. They don't return
any data. Sometimes the total execution time can take 2-3 minutes, but even
though I have set the executionTimeout in web.config to a high number of
seconds (2400), the request will still time out after 90 seconds. The user
sees a Request timed out error. The app logs a ThreadAborted exception,
[Thread was being aborted].

The web app and the component are compiled in Release mode. I read that you
only have to set one property; executionTimeout or the ScriptTimeout
property in IIS, but not both. Is that true or false?

Thanks for your help,

Mark

Nov 19 '05 #1
Share this Question
Share on Google+
10 Replies


P: n/a
You should consider redesigning this long running work so the browser isn't
waiting for it to complete. So make a button that initiates the work, then
give the user the ability to refresh the page to see the pending work. To
initiate the work you'll have to kick off another thread somehow (so use
ThreadPool.QueueUserWorkItem, or manually create another thread; there are
pros and cons to each of these approaches). To monitor the pending work you'll
need some other status table in the DB where your user can see if the work
is complete. Once it is, update that table.

Anyway, just an idea on how to rework this long running task....

-Brock
DevelopMentor
http://staff.develop.com/ballen
Our asp.net web app uses a .NET component (DLL) in the bin directory
to call several stored procedures back to back to perform updates.
They don't return any data. Sometimes the total execution time can
take 2-3 minutes, but even though I have set the executionTimeout in
web.config to a high number of seconds (2400), the request will still
time out after 90 seconds. The user sees a Request timed out error.
The app logs a ThreadAborted exception, [Thread was being aborted].

The web app and the component are compiled in Release mode. I read
that you only have to set one property; executionTimeout or the
ScriptTimeout property in IIS, but not both. Is that true or false?

Thanks for your help,

Mark


Nov 19 '05 #2

P: n/a
Brock,

Thanks for your reply, it sounds like a good idea. Will AJAX allow me to
initiate the long running task and give the user the ability to refresh the
page to get the status? I have read an article or two on AJAX but haven't
used it yet.

Thanks,

Mark

"Brock Allen" <ba****@NOSPAMdevelop.com> wrote in message
news:11***********************@msnews.microsoft.co m...
You should consider redesigning this long running work so the browser
isn't waiting for it to complete. So make a button that initiates the
work, then give the user the ability to refresh the page to see the
pending work. To initiate the work you'll have to kick off another thread
somehow (so use ThreadPool.QueueUserWorkItem, or manually create another
thread; there are pros and cons to each of these approaches). To monitor
the pending work you'll need some other status table in the DB where your
user can see if the work is complete. Once it is, update that table.
Anyway, just an idea on how to rework this long running task....

-Brock
DevelopMentor
http://staff.develop.com/ballen
Our asp.net web app uses a .NET component (DLL) in the bin directory
to call several stored procedures back to back to perform updates.
They don't return any data. Sometimes the total execution time can
take 2-3 minutes, but even though I have set the executionTimeout in
web.config to a high number of seconds (2400), the request will still
time out after 90 seconds. The user sees a Request timed out error.
The app logs a ThreadAborted exception, [Thread was being aborted].

The web app and the component are compiled in Release mode. I read
that you only have to set one property; executionTimeout or the
ScriptTimeout property in IIS, but not both. Is that true or false?

Thanks for your help,

Mark


Nov 19 '05 #3

P: n/a
Well, you need to access the server somehow to initiate the long running
task. It doesn't matter if that's an AJAX call or a normal page post. Same
thing for refreshing thew page to check the status; somehow you need to contact
the server. Both approaches will work.

-Brock
DevelopMentor
http://staff.develop.com/ballen
Brock,

Thanks for your reply, it sounds like a good idea. Will AJAX allow me
to initiate the long running task and give the user the ability to
refresh the page to get the status? I have read an article or two on
AJAX but haven't used it yet.

Thanks,

Mark

"Brock Allen" <ba****@NOSPAMdevelop.com> wrote in message
news:11***********************@msnews.microsoft.co m...
You should consider redesigning this long running work so the browser
isn't waiting for it to complete. So make a button that initiates the
work, then give the user the ability to refresh the page to see the
pending work. To initiate the work you'll have to kick off another
thread somehow (so use ThreadPool.QueueUserWorkItem, or manually
create another thread; there are pros and cons to each of these
approaches). To monitor the pending work you'll need some other
status table in the DB where your user can see if the work is
complete. Once it is, update that table. Anyway, just an idea on how
to rework this long running task....

-Brock
DevelopMentor
http://staff.develop.com/ballen
Our asp.net web app uses a .NET component (DLL) in the bin directory
to call several stored procedures back to back to perform updates.
They don't return any data. Sometimes the total execution time can
take 2-3 minutes, but even though I have set the executionTimeout in
web.config to a high number of seconds (2400), the request will
still time out after 90 seconds. The user sees a Request timed out
error. The app logs a ThreadAborted exception, [Thread was being
aborted].

The web app and the component are compiled in Release mode. I read
that you only have to set one property; executionTimeout or the
ScriptTimeout property in IIS, but not both. Is that true or false?

Thanks for your help,

Mark


Nov 19 '05 #4

P: n/a
Thanks again, but the immediate issue is this is a production application
that needs to be fixed ASAP. For the short term, shouldn't I be able to use
the executionTimeout attribute of the <httpRunTime> element to control these
timeouts? That's the way the documentation reads anyway.
Thanks,

Mark
"Brock Allen" <ba****@NOSPAMdevelop.com> wrote in message
news:11***********************@msnews.microsoft.co m...
Well, you need to access the server somehow to initiate the long running
task. It doesn't matter if that's an AJAX call or a normal page post. Same
thing for refreshing thew page to check the status; somehow you need to contact the server. Both approaches will work.

-Brock
DevelopMentor
http://staff.develop.com/ballen
Brock,

Thanks for your reply, it sounds like a good idea. Will AJAX allow me
to initiate the long running task and give the user the ability to
refresh the page to get the status? I have read an article or two on
AJAX but haven't used it yet.

Thanks,

Mark

"Brock Allen" <ba****@NOSPAMdevelop.com> wrote in message
news:11***********************@msnews.microsoft.co m...
You should consider redesigning this long running work so the browser
isn't waiting for it to complete. So make a button that initiates the
work, then give the user the ability to refresh the page to see the
pending work. To initiate the work you'll have to kick off another
thread somehow (so use ThreadPool.QueueUserWorkItem, or manually
create another thread; there are pros and cons to each of these
approaches). To monitor the pending work you'll need some other
status table in the DB where your user can see if the work is
complete. Once it is, update that table. Anyway, just an idea on how
to rework this long running task....

-Brock
DevelopMentor
http://staff.develop.com/ballen
Our asp.net web app uses a .NET component (DLL) in the bin directory
to call several stored procedures back to back to perform updates.
They don't return any data. Sometimes the total execution time can
take 2-3 minutes, but even though I have set the executionTimeout in
web.config to a high number of seconds (2400), the request will
still time out after 90 seconds. The user sees a Request timed out
error. The app logs a ThreadAborted exception, [Thread was being
aborted].

The web app and the component are compiled in Release mode. I read
that you only have to set one property; executionTimeout or the
ScriptTimeout property in IIS, but not both. Is that true or false?

Thanks for your help,

Mark


Nov 19 '05 #5

P: n/a
The browser really is the ultimate problem here, since it can choose to abandon
the request. You don't have a lot of control over that...

Re: fixing this ASAP: It really isn't a lot of work. I could imagine it getting
done in one or two days.

-Brock
DevelopMentor
http://staff.develop.com/ballen
Thanks again, but the immediate issue is this is a production
application
that needs to be fixed ASAP. For the short term, shouldn't I be able
to use
the executionTimeout attribute of the <httpRunTime> element to control
these
timeouts? That's the way the documentation reads anyway.
Thanks,
Mark

"Brock Allen" <ba****@NOSPAMdevelop.com> wrote in message
news:11***********************@msnews.microsoft.co m...
Well, you need to access the server somehow to initiate the long
running task. It doesn't matter if that's an AJAX call or a normal
page post. Same thing for refreshing thew page to check the status;
somehow you need to

contact
the server. Both approaches will work.

-Brock
DevelopMentor
http://staff.develop.com/ballen
Brock,

Thanks for your reply, it sounds like a good idea. Will AJAX allow
me to initiate the long running task and give the user the ability
to refresh the page to get the status? I have read an article or two
on AJAX but haven't used it yet.

Thanks,

Mark

"Brock Allen" <ba****@NOSPAMdevelop.com> wrote in message
news:11***********************@msnews.microsoft.co m...

You should consider redesigning this long running work so the
browser isn't waiting for it to complete. So make a button that
initiates the work, then give the user the ability to refresh the
page to see the pending work. To initiate the work you'll have to
kick off another thread somehow (so use
ThreadPool.QueueUserWorkItem, or manually create another thread;
there are pros and cons to each of these approaches). To monitor
the pending work you'll need some other status table in the DB
where your user can see if the work is complete. Once it is, update
that table. Anyway, just an idea on how to rework this long running
task....

-Brock
DevelopMentor
http://staff.develop.com/ballen
> Our asp.net web app uses a .NET component (DLL) in the bin
> directory to call several stored procedures back to back to
> perform updates. They don't return any data. Sometimes the total
> execution time can take 2-3 minutes, but even though I have set
> the executionTimeout in web.config to a high number of seconds
> (2400), the request will still time out after 90 seconds. The
> user sees a Request timed out error. The app logs a ThreadAborted
> exception, [Thread was being aborted].
>
> The web app and the component are compiled in Release mode. I
> read that you only have to set one property; executionTimeout or
> the ScriptTimeout property in IIS, but not both. Is that true or
> false?
>
> Thanks for your help,
>
> Mark
>


Nov 19 '05 #6

P: n/a
I guess I better get to work :-), I'll let you know how it turns out.

Thanks for the info,

Mark
"Brock Allen" <ba****@NOSPAMdevelop.com> wrote in message
news:11***********************@msnews.microsoft.co m...
The browser really is the ultimate problem here, since it can choose to abandon the request. You don't have a lot of control over that...

Re: fixing this ASAP: It really isn't a lot of work. I could imagine it getting done in one or two days.

-Brock
DevelopMentor
http://staff.develop.com/ballen
Thanks again, but the immediate issue is this is a production
application
that needs to be fixed ASAP. For the short term, shouldn't I be able
to use
the executionTimeout attribute of the <httpRunTime> element to control
these
timeouts? That's the way the documentation reads anyway.
Thanks,
Mark

"Brock Allen" <ba****@NOSPAMdevelop.com> wrote in message
news:11***********************@msnews.microsoft.co m...
Well, you need to access the server somehow to initiate the long
running task. It doesn't matter if that's an AJAX call or a normal
page post. Same thing for refreshing thew page to check the status;
somehow you need to

contact
the server. Both approaches will work.

-Brock
DevelopMentor
http://staff.develop.com/ballen
Brock,

Thanks for your reply, it sounds like a good idea. Will AJAX allow
me to initiate the long running task and give the user the ability
to refresh the page to get the status? I have read an article or two
on AJAX but haven't used it yet.

Thanks,

Mark

"Brock Allen" <ba****@NOSPAMdevelop.com> wrote in message
news:11***********************@msnews.microsoft.co m...

> You should consider redesigning this long running work so the
> browser isn't waiting for it to complete. So make a button that
> initiates the work, then give the user the ability to refresh the
> page to see the pending work. To initiate the work you'll have to
> kick off another thread somehow (so use
> ThreadPool.QueueUserWorkItem, or manually create another thread;
> there are pros and cons to each of these approaches). To monitor
> the pending work you'll need some other status table in the DB
> where your user can see if the work is complete. Once it is, update
> that table. Anyway, just an idea on how to rework this long running
> task....
>
> -Brock
> DevelopMentor
> http://staff.develop.com/ballen
>> Our asp.net web app uses a .NET component (DLL) in the bin
>> directory to call several stored procedures back to back to
>> perform updates. They don't return any data. Sometimes the total
>> execution time can take 2-3 minutes, but even though I have set
>> the executionTimeout in web.config to a high number of seconds
>> (2400), the request will still time out after 90 seconds. The
>> user sees a Request timed out error. The app logs a ThreadAborted
>> exception, [Thread was being aborted].
>>
>> The web app and the component are compiled in Release mode. I
>> read that you only have to set one property; executionTimeout or
>> the ScriptTimeout property in IIS, but not both. Is that true or
>> false?
>>
>> Thanks for your help,
>>
>> Mark
>>


Nov 19 '05 #7

P: n/a
Thanks for Brock's good suggesitons.

Hi Mark,

In addition to Brock's suggestion on make your serverside processing
asynchronously so as to release the woker thread, regarding on the problem
itself, I think you can still check the following things:

1. You can use the Server.ScriptTime property to also adjust the
ScriptTimeout value in addition to the httpRuntime/@executeTimeout setting,
just to make sure all the worker thread level timeout has been adjusted
correctly.

2. Please check the web.config file 's system.web/compilation/@debug
attribute to see whether it is set to "true" or "false", if false, please
change it to "true" since the "executeTimeout won't work correctly under
debug compilation.

In addition, you can also check whether you've apply any Timeout setting at
the database processing layer, such as the SqlCommand's IdleTimeout .

Hope also helps. Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| From: "Mark G" <gr****@community.nospam>
| References: <#o**************@TK2MSFTNGP12.phx.gbl>
<11***********************@msnews.microsoft.com>
| Subject: Re: Execution Timeout Problem
| Date: Sun, 21 Aug 2005 17:51:25 -0500
| Lines: 100
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
| Message-ID: <O#*************@TK2MSFTNGP09.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: alxapex01.southernco.com 146.126.51.51
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP09.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.aspnet:119366
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| I guess I better get to work :-), I'll let you know how it turns out.
|
| Thanks for the info,
|
| Mark
|
|
| "Brock Allen" <ba****@NOSPAMdevelop.com> wrote in message
| news:11***********************@msnews.microsoft.co m...
| > The browser really is the ultimate problem here, since it can choose to
| abandon
| > the request. You don't have a lot of control over that...
| >
| > Re: fixing this ASAP: It really isn't a lot of work. I could imagine it
| getting
| > done in one or two days.
| >
| > -Brock
| > DevelopMentor
| > http://staff.develop.com/ballen
| >
| >
| >
| > > Thanks again, but the immediate issue is this is a production
| > > application
| > > that needs to be fixed ASAP. For the short term, shouldn't I be able
| > > to use
| > > the executionTimeout attribute of the <httpRunTime> element to control
| > > these
| > > timeouts? That's the way the documentation reads anyway.
| > > Thanks,
| > > Mark
| > >
| > > "Brock Allen" <ba****@NOSPAMdevelop.com> wrote in message
| > > news:11***********************@msnews.microsoft.co m...
| > >
| > >> Well, you need to access the server somehow to initiate the long
| > >> running task. It doesn't matter if that's an AJAX call or a normal
| > >> page post. Same thing for refreshing thew page to check the status;
| > >> somehow you need to
| > >>
| > > contact
| > >
| > >> the server. Both approaches will work.
| > >>
| > >> -Brock
| > >> DevelopMentor
| > >> http://staff.develop.com/ballen
| > >>> Brock,
| > >>>
| > >>> Thanks for your reply, it sounds like a good idea. Will AJAX allow
| > >>> me to initiate the long running task and give the user the ability
| > >>> to refresh the page to get the status? I have read an article or two
| > >>> on AJAX but haven't used it yet.
| > >>>
| > >>> Thanks,
| > >>>
| > >>> Mark
| > >>>
| > >>> "Brock Allen" <ba****@NOSPAMdevelop.com> wrote in message
| > >>> news:11***********************@msnews.microsoft.co m...
| > >>>
| > >>>> You should consider redesigning this long running work so the
| > >>>> browser isn't waiting for it to complete. So make a button that
| > >>>> initiates the work, then give the user the ability to refresh the
| > >>>> page to see the pending work. To initiate the work you'll have to
| > >>>> kick off another thread somehow (so use
| > >>>> ThreadPool.QueueUserWorkItem, or manually create another thread;
| > >>>> there are pros and cons to each of these approaches). To monitor
| > >>>> the pending work you'll need some other status table in the DB
| > >>>> where your user can see if the work is complete. Once it is, update
| > >>>> that table. Anyway, just an idea on how to rework this long running
| > >>>> task....
| > >>>>
| > >>>> -Brock
| > >>>> DevelopMentor
| > >>>> http://staff.develop.com/ballen
| > >>>>> Our asp.net web app uses a .NET component (DLL) in the bin
| > >>>>> directory to call several stored procedures back to back to
| > >>>>> perform updates. They don't return any data. Sometimes the total
| > >>>>> execution time can take 2-3 minutes, but even though I have set
| > >>>>> the executionTimeout in web.config to a high number of seconds
| > >>>>> (2400), the request will still time out after 90 seconds. The
| > >>>>> user sees a Request timed out error. The app logs a ThreadAborted
| > >>>>> exception, [Thread was being aborted].
| > >>>>>
| > >>>>> The web app and the component are compiled in Release mode. I
| > >>>>> read that you only have to set one property; executionTimeout or
| > >>>>> the ScriptTimeout property in IIS, but not both. Is that true or
| > >>>>> false?
| > >>>>>
| > >>>>> Thanks for your help,
| > >>>>>
| > >>>>> Mark
| > >>>>>
| >
| >
| >
|
|
|

Nov 19 '05 #8

P: n/a
Steven,

Thanks for your reply.

I have a question about your second suggestion below, concerning the debug
attribute in web.config. You suggested setting it to "true". If it's set
to "true" (debug-true), isn't that setting the compilation to DEBUG? You
said "executeTimeout won't work correctly under debug compilation".

Thanks,

Mark
"Steven Cheng[MSFT]" <st*****@online.microsoft.com> wrote in message
news:61*************@TK2MSFTNGXA01.phx.gbl...
Thanks for Brock's good suggesitons.

Hi Mark,

In addition to Brock's suggestion on make your serverside processing
asynchronously so as to release the woker thread, regarding on the problem
itself, I think you can still check the following things:

1. You can use the Server.ScriptTime property to also adjust the
ScriptTimeout value in addition to the httpRuntime/@executeTimeout setting, just to make sure all the worker thread level timeout has been adjusted
correctly.

2. Please check the web.config file 's system.web/compilation/@debug
attribute to see whether it is set to "true" or "false", if false, please
change it to "true" since the "executeTimeout won't work correctly under
debug compilation.

In addition, you can also check whether you've apply any Timeout setting at the database processing layer, such as the SqlCommand's IdleTimeout .

Hope also helps. Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| From: "Mark G" <gr****@community.nospam>
| References: <#o**************@TK2MSFTNGP12.phx.gbl>
<11***********************@msnews.microsoft.com>
| Subject: Re: Execution Timeout Problem
| Date: Sun, 21 Aug 2005 17:51:25 -0500
| Lines: 100
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
| Message-ID: <O#*************@TK2MSFTNGP09.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: alxapex01.southernco.com 146.126.51.51
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP09.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.aspnet:119366
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| I guess I better get to work :-), I'll let you know how it turns out.
|
| Thanks for the info,
|
| Mark
|
|
| "Brock Allen" <ba****@NOSPAMdevelop.com> wrote in message
| news:11***********************@msnews.microsoft.co m...
| > The browser really is the ultimate problem here, since it can choose to | abandon
| > the request. You don't have a lot of control over that...
| >
| > Re: fixing this ASAP: It really isn't a lot of work. I could imagine it | getting
| > done in one or two days.
| >
| > -Brock
| > DevelopMentor
| > http://staff.develop.com/ballen
| >
| >
| >
| > > Thanks again, but the immediate issue is this is a production
| > > application
| > > that needs to be fixed ASAP. For the short term, shouldn't I be able | > > to use
| > > the executionTimeout attribute of the <httpRunTime> element to control | > > these
| > > timeouts? That's the way the documentation reads anyway.
| > > Thanks,
| > > Mark
| > >
| > > "Brock Allen" <ba****@NOSPAMdevelop.com> wrote in message
| > > news:11***********************@msnews.microsoft.co m...
| > >
| > >> Well, you need to access the server somehow to initiate the long
| > >> running task. It doesn't matter if that's an AJAX call or a normal
| > >> page post. Same thing for refreshing thew page to check the status;
| > >> somehow you need to
| > >>
| > > contact
| > >
| > >> the server. Both approaches will work.
| > >>
| > >> -Brock
| > >> DevelopMentor
| > >> http://staff.develop.com/ballen
| > >>> Brock,
| > >>>
| > >>> Thanks for your reply, it sounds like a good idea. Will AJAX allow | > >>> me to initiate the long running task and give the user the ability
| > >>> to refresh the page to get the status? I have read an article or two | > >>> on AJAX but haven't used it yet.
| > >>>
| > >>> Thanks,
| > >>>
| > >>> Mark
| > >>>
| > >>> "Brock Allen" <ba****@NOSPAMdevelop.com> wrote in message
| > >>> news:11***********************@msnews.microsoft.co m...
| > >>>
| > >>>> You should consider redesigning this long running work so the
| > >>>> browser isn't waiting for it to complete. So make a button that
| > >>>> initiates the work, then give the user the ability to refresh the
| > >>>> page to see the pending work. To initiate the work you'll have to
| > >>>> kick off another thread somehow (so use
| > >>>> ThreadPool.QueueUserWorkItem, or manually create another thread;
| > >>>> there are pros and cons to each of these approaches). To monitor
| > >>>> the pending work you'll need some other status table in the DB
| > >>>> where your user can see if the work is complete. Once it is, update | > >>>> that table. Anyway, just an idea on how to rework this long running | > >>>> task....
| > >>>>
| > >>>> -Brock
| > >>>> DevelopMentor
| > >>>> http://staff.develop.com/ballen
| > >>>>> Our asp.net web app uses a .NET component (DLL) in the bin
| > >>>>> directory to call several stored procedures back to back to
| > >>>>> perform updates. They don't return any data. Sometimes the total
| > >>>>> execution time can take 2-3 minutes, but even though I have set
| > >>>>> the executionTimeout in web.config to a high number of seconds
| > >>>>> (2400), the request will still time out after 90 seconds. The
| > >>>>> user sees a Request timed out error. The app logs a ThreadAborted | > >>>>> exception, [Thread was being aborted].
| > >>>>>
| > >>>>> The web app and the component are compiled in Release mode. I
| > >>>>> read that you only have to set one property; executionTimeout or
| > >>>>> the ScriptTimeout property in IIS, but not both. Is that true or | > >>>>> false?
| > >>>>>
| > >>>>> Thanks for your help,
| > >>>>>
| > >>>>> Mark
| > >>>>>
| >
| >
| >
|
|
|

Nov 19 '05 #9

P: n/a
Thanks for your response Mark,

Oops... I'm afraid I've made a type mistake, what I want to say is we
should set debug to false so as to make the executeTimeout work currently.
Sorry for the inconvenience.

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| From: "Mark G" <gr****@community.nospam>
| References: <#o**************@TK2MSFTNGP12.phx.gbl>
<11***********************@msnews.microsoft.com>
<O#*************@TK2MSFTNGP09.phx.gbl>
<61*************@TK2MSFTNGXA01.phx.gbl>
| Subject: Re: Execution Timeout Problem
| Date: Mon, 22 Aug 2005 08:56:37 -0500
| Lines: 180
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
| Message-ID: <#u**************@TK2MSFTNGP10.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: sfxapgenv.southerngeneration.com 12.38.227.5
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP10.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.aspnet:119458
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Steven,
|
| Thanks for your reply.
|
| I have a question about your second suggestion below, concerning the debug
| attribute in web.config. You suggested setting it to "true". If it's set
| to "true" (debug-true), isn't that setting the compilation to DEBUG? You
| said "executeTimeout won't work correctly under debug compilation".
|
| Thanks,
|
| Mark
|
|
| "Steven Cheng[MSFT]" <st*****@online.microsoft.com> wrote in message
| news:61*************@TK2MSFTNGXA01.phx.gbl...
| > Thanks for Brock's good suggesitons.
| >
| > Hi Mark,
| >
| > In addition to Brock's suggestion on make your serverside processing
| > asynchronously so as to release the woker thread, regarding on the
problem
| > itself, I think you can still check the following things:
| >
| > 1. You can use the Server.ScriptTime property to also adjust the
| > ScriptTimeout value in addition to the httpRuntime/@executeTimeout
| setting,
| > just to make sure all the worker thread level timeout has been adjusted
| > correctly.
| >
| > 2. Please check the web.config file 's system.web/compilation/@debug
| > attribute to see whether it is set to "true" or "false", if false,
please
| > change it to "true" since the "executeTimeout won't work correctly
under
| > debug compilation.
| >
| > In addition, you can also check whether you've apply any Timeout setting
| at
| > the database processing layer, such as the SqlCommand's IdleTimeout .
| >
| > Hope also helps. Thanks,
| >
| > Steven Cheng
| > Microsoft Online Support
| >
| > Get Secure! www.microsoft.com/security
| > (This posting is provided "AS IS", with no warranties, and confers no
| > rights.)
| > --------------------
| > | From: "Mark G" <gr****@community.nospam>
| > | References: <#o**************@TK2MSFTNGP12.phx.gbl>
| > <11***********************@msnews.microsoft.com>
| > | Subject: Re: Execution Timeout Problem
| > | Date: Sun, 21 Aug 2005 17:51:25 -0500
| > | Lines: 100
| > | X-Priority: 3
| > | X-MSMail-Priority: Normal
| > | X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
| > | Message-ID: <O#*************@TK2MSFTNGP09.phx.gbl>
| > | Newsgroups: microsoft.public.dotnet.framework.aspnet
| > | NNTP-Posting-Host: alxapex01.southernco.com 146.126.51.51
| > | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP09.phx.gbl
| > | Xref: TK2MSFTNGXA01.phx.gbl
| > microsoft.public.dotnet.framework.aspnet:119366
| > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| > |
| > | I guess I better get to work :-), I'll let you know how it turns out.
| > |
| > | Thanks for the info,
| > |
| > | Mark
| > |
| > |
| > | "Brock Allen" <ba****@NOSPAMdevelop.com> wrote in message
| > | news:11***********************@msnews.microsoft.co m...
| > | > The browser really is the ultimate problem here, since it can choose
| to
| > | abandon
| > | > the request. You don't have a lot of control over that...
| > | >
| > | > Re: fixing this ASAP: It really isn't a lot of work. I could imagine
| it
| > | getting
| > | > done in one or two days.
| > | >
| > | > -Brock
| > | > DevelopMentor
| > | > http://staff.develop.com/ballen
| > | >
| > | >
| > | >
| > | > > Thanks again, but the immediate issue is this is a production
| > | > > application
| > | > > that needs to be fixed ASAP. For the short term, shouldn't I be
| able
| > | > > to use
| > | > > the executionTimeout attribute of the <httpRunTime> element to
| control
| > | > > these
| > | > > timeouts? That's the way the documentation reads anyway.
| > | > > Thanks,
| > | > > Mark
| > | > >
| > | > > "Brock Allen" <ba****@NOSPAMdevelop.com> wrote in message
| > | > > news:11***********************@msnews.microsoft.co m...
| > | > >
| > | > >> Well, you need to access the server somehow to initiate the long
| > | > >> running task. It doesn't matter if that's an AJAX call or a
normal
| > | > >> page post. Same thing for refreshing thew page to check the
status;
| > | > >> somehow you need to
| > | > >>
| > | > > contact
| > | > >
| > | > >> the server. Both approaches will work.
| > | > >>
| > | > >> -Brock
| > | > >> DevelopMentor
| > | > >> http://staff.develop.com/ballen
| > | > >>> Brock,
| > | > >>>
| > | > >>> Thanks for your reply, it sounds like a good idea. Will AJAX
| allow
| > | > >>> me to initiate the long running task and give the user the
ability
| > | > >>> to refresh the page to get the status? I have read an article or
| two
| > | > >>> on AJAX but haven't used it yet.
| > | > >>>
| > | > >>> Thanks,
| > | > >>>
| > | > >>> Mark
| > | > >>>
| > | > >>> "Brock Allen" <ba****@NOSPAMdevelop.com> wrote in message
| > | > >>> news:11***********************@msnews.microsoft.co m...
| > | > >>>
| > | > >>>> You should consider redesigning this long running work so the
| > | > >>>> browser isn't waiting for it to complete. So make a button that
| > | > >>>> initiates the work, then give the user the ability to refresh
the
| > | > >>>> page to see the pending work. To initiate the work you'll have
to
| > | > >>>> kick off another thread somehow (so use
| > | > >>>> ThreadPool.QueueUserWorkItem, or manually create another
thread;
| > | > >>>> there are pros and cons to each of these approaches). To
monitor
| > | > >>>> the pending work you'll need some other status table in the DB
| > | > >>>> where your user can see if the work is complete. Once it is,
| update
| > | > >>>> that table. Anyway, just an idea on how to rework this long
| running
| > | > >>>> task....
| > | > >>>>
| > | > >>>> -Brock
| > | > >>>> DevelopMentor
| > | > >>>> http://staff.develop.com/ballen
| > | > >>>>> Our asp.net web app uses a .NET component (DLL) in the bin
| > | > >>>>> directory to call several stored procedures back to back to
| > | > >>>>> perform updates. They don't return any data. Sometimes the
total
| > | > >>>>> execution time can take 2-3 minutes, but even though I have
set
| > | > >>>>> the executionTimeout in web.config to a high number of seconds
| > | > >>>>> (2400), the request will still time out after 90 seconds. The
| > | > >>>>> user sees a Request timed out error. The app logs a
| ThreadAborted
| > | > >>>>> exception, [Thread was being aborted].
| > | > >>>>>
| > | > >>>>> The web app and the component are compiled in Release mode. I
| > | > >>>>> read that you only have to set one property; executionTimeout
or
| > | > >>>>> the ScriptTimeout property in IIS, but not both. Is that true
| or
| > | > >>>>> false?
| > | > >>>>>
| > | > >>>>> Thanks for your help,
| > | > >>>>>
| > | > >>>>> Mark
| > | > >>>>>
| > | >
| > | >
| > | >
| > |
| > |
| > |
| >
|
|
|

Nov 19 '05 #10

P: n/a
Hi Mark,

How are you doing on this issue, is there any progress? If there're any
further things we can help, please feel free to post here. Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| X-Tomcat-ID: 14407249
| References: <#o**************@TK2MSFTNGP12.phx.gbl>
<11***********************@msnews.microsoft.com>
<O#*************@TK2MSFTNGP09.phx.gbl>
<61*************@TK2MSFTNGXA01.phx.gbl>
<#u**************@TK2MSFTNGP10.phx.gbl>
| MIME-Version: 1.0
| Content-Type: text/plain
| Content-Transfer-Encoding: 7bit
| From: st*****@online.microsoft.com (Steven Cheng[MSFT])
| Organization: Microsoft
| Date: Tue, 23 Aug 2005 00:46:19 GMT
| Subject: Re: Execution Timeout Problem
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| Message-ID: <qV**************@TK2MSFTNGXA01.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| Lines: 204
| Path: TK2MSFTNGXA01.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.aspnet:119611
| NNTP-Posting-Host: tomcatimport2.phx.gbl 10.201.218.182
|
| Thanks for your response Mark,
|
| Oops... I'm afraid I've made a type mistake, what I want to say is we
| should set debug to false so as to make the executeTimeout work
currently.
| Sorry for the inconvenience.
|
| Steven Cheng
| Microsoft Online Support
|
| Get Secure! www.microsoft.com/security
| (This posting is provided "AS IS", with no warranties, and confers no
| rights.)
| --------------------
| | From: "Mark G" <gr****@community.nospam>
| | References: <#o**************@TK2MSFTNGP12.phx.gbl>
| <11***********************@msnews.microsoft.com>
| <O#*************@TK2MSFTNGP09.phx.gbl>
| <61*************@TK2MSFTNGXA01.phx.gbl>
| | Subject: Re: Execution Timeout Problem
| | Date: Mon, 22 Aug 2005 08:56:37 -0500
| | Lines: 180
| | X-Priority: 3
| | X-MSMail-Priority: Normal
| | X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
| | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
| | Message-ID: <#u**************@TK2MSFTNGP10.phx.gbl>
| | Newsgroups: microsoft.public.dotnet.framework.aspnet
| | NNTP-Posting-Host: sfxapgenv.southerngeneration.com 12.38.227.5
| | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP10.phx.gbl
| | Xref: TK2MSFTNGXA01.phx.gbl
| microsoft.public.dotnet.framework.aspnet:119458
| | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| |
| | Steven,
| |
| | Thanks for your reply.
| |
| | I have a question about your second suggestion below, concerning the
debug
| | attribute in web.config. You suggested setting it to "true". If it's
set
| | to "true" (debug-true), isn't that setting the compilation to DEBUG?
You
| | said "executeTimeout won't work correctly under debug compilation".
| |
| | Thanks,
| |
| | Mark
| |
| |
| | "Steven Cheng[MSFT]" <st*****@online.microsoft.com> wrote in message
| | news:61*************@TK2MSFTNGXA01.phx.gbl...
| | > Thanks for Brock's good suggesitons.
| | >
| | > Hi Mark,
| | >
| | > In addition to Brock's suggestion on make your serverside processing
| | > asynchronously so as to release the woker thread, regarding on the
| problem
| | > itself, I think you can still check the following things:
| | >
| | > 1. You can use the Server.ScriptTime property to also adjust the
| | > ScriptTimeout value in addition to the httpRuntime/@executeTimeout
| | setting,
| | > just to make sure all the worker thread level timeout has been
adjusted
| | > correctly.
| | >
| | > 2. Please check the web.config file 's system.web/compilation/@debug
| | > attribute to see whether it is set to "true" or "false", if false,
| please
| | > change it to "true" since the "executeTimeout won't work correctly
| under
| | > debug compilation.
| | >
| | > In addition, you can also check whether you've apply any Timeout
setting
| | at
| | > the database processing layer, such as the SqlCommand's IdleTimeout .
| | >
| | > Hope also helps. Thanks,
| | >
| | > Steven Cheng
| | > Microsoft Online Support
| | >
| | > Get Secure! www.microsoft.com/security
| | > (This posting is provided "AS IS", with no warranties, and confers no
| | > rights.)
| | > --------------------
| | > | From: "Mark G" <gr****@community.nospam>
| | > | References: <#o**************@TK2MSFTNGP12.phx.gbl>
| | > <11***********************@msnews.microsoft.com>
| | > | Subject: Re: Execution Timeout Problem
| | > | Date: Sun, 21 Aug 2005 17:51:25 -0500
| | > | Lines: 100
| | > | X-Priority: 3
| | > | X-MSMail-Priority: Normal
| | > | X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
| | > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
| | > | Message-ID: <O#*************@TK2MSFTNGP09.phx.gbl>
| | > | Newsgroups: microsoft.public.dotnet.framework.aspnet
| | > | NNTP-Posting-Host: alxapex01.southernco.com 146.126.51.51
| | > | Path:
TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP09.phx.gbl
| | > | Xref: TK2MSFTNGXA01.phx.gbl
| | > microsoft.public.dotnet.framework.aspnet:119366
| | > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| | > |
| | > | I guess I better get to work :-), I'll let you know how it turns
out.
| | > |
| | > | Thanks for the info,
| | > |
| | > | Mark
| | > |
| | > |
| | > | "Brock Allen" <ba****@NOSPAMdevelop.com> wrote in message
| | > | news:11***********************@msnews.microsoft.co m...
| | > | > The browser really is the ultimate problem here, since it can
choose
| | to
| | > | abandon
| | > | > the request. You don't have a lot of control over that...
| | > | >
| | > | > Re: fixing this ASAP: It really isn't a lot of work. I could
imagine
| | it
| | > | getting
| | > | > done in one or two days.
| | > | >
| | > | > -Brock
| | > | > DevelopMentor
| | > | > http://staff.develop.com/ballen
| | > | >
| | > | >
| | > | >
| | > | > > Thanks again, but the immediate issue is this is a production
| | > | > > application
| | > | > > that needs to be fixed ASAP. For the short term, shouldn't I be
| | able
| | > | > > to use
| | > | > > the executionTimeout attribute of the <httpRunTime> element to
| | control
| | > | > > these
| | > | > > timeouts? That's the way the documentation reads anyway.
| | > | > > Thanks,
| | > | > > Mark
| | > | > >
| | > | > > "Brock Allen" <ba****@NOSPAMdevelop.com> wrote in message
| | > | > > news:11***********************@msnews.microsoft.co m...
| | > | > >
| | > | > >> Well, you need to access the server somehow to initiate the
long
| | > | > >> running task. It doesn't matter if that's an AJAX call or a
| normal
| | > | > >> page post. Same thing for refreshing thew page to check the
| status;
| | > | > >> somehow you need to
| | > | > >>
| | > | > > contact
| | > | > >
| | > | > >> the server. Both approaches will work.
| | > | > >>
| | > | > >> -Brock
| | > | > >> DevelopMentor
| | > | > >> http://staff.develop.com/ballen
| | > | > >>> Brock,
| | > | > >>>
| | > | > >>> Thanks for your reply, it sounds like a good idea. Will AJAX
| | allow
| | > | > >>> me to initiate the long running task and give the user the
| ability
| | > | > >>> to refresh the page to get the status? I have read an article
or
| | two
| | > | > >>> on AJAX but haven't used it yet.
| | > | > >>>
| | > | > >>> Thanks,
| | > | > >>>
| | > | > >>> Mark
| | > | > >>>
| | > | > >>> "Brock Allen" <ba****@NOSPAMdevelop.com> wrote in message
| | > | > >>> news:11***********************@msnews.microsoft.co m...
| | > | > >>>
| | > | > >>>> You should consider redesigning this long running work so the
| | > | > >>>> browser isn't waiting for it to complete. So make a button
that
| | > | > >>>> initiates the work, then give the user the ability to
refresh
| the
| | > | > >>>> page to see the pending work. To initiate the work you'll
have
| to
| | > | > >>>> kick off another thread somehow (so use
| | > | > >>>> ThreadPool.QueueUserWorkItem, or manually create another
| thread;
| | > | > >>>> there are pros and cons to each of these approaches). To
| monitor
| | > | > >>>> the pending work you'll need some other status table in the
DB
| | > | > >>>> where your user can see if the work is complete. Once it is,
| | update
| | > | > >>>> that table. Anyway, just an idea on how to rework this long
| | running
| | > | > >>>> task....
| | > | > >>>>
| | > | > >>>> -Brock
| | > | > >>>> DevelopMentor
| | > | > >>>> http://staff.develop.com/ballen
| | > | > >>>>> Our asp.net web app uses a .NET component (DLL) in the bin
| | > | > >>>>> directory to call several stored procedures back to back to
| | > | > >>>>> perform updates. They don't return any data. Sometimes the
| total
| | > | > >>>>> execution time can take 2-3 minutes, but even though I have
| set
| | > | > >>>>> the executionTimeout in web.config to a high number of
seconds
| | > | > >>>>> (2400), the request will still time out after 90 seconds.
The
| | > | > >>>>> user sees a Request timed out error. The app logs a
| | ThreadAborted
| | > | > >>>>> exception, [Thread was being aborted].
| | > | > >>>>>
| | > | > >>>>> The web app and the component are compiled in Release mode.
I
| | > | > >>>>> read that you only have to set one property;
executionTimeout
| or
| | > | > >>>>> the ScriptTimeout property in IIS, but not both. Is that
true
| | or
| | > | > >>>>> false?
| | > | > >>>>>
| | > | > >>>>> Thanks for your help,
| | > | > >>>>>
| | > | > >>>>> Mark
| | > | > >>>>>
| | > | >
| | > | >
| | > | >
| | > |
| | > |
| | > |
| | >
| |
| |
| |
|
|

Nov 19 '05 #11

This discussion thread is closed

Replies have been disabled for this discussion.