AppDomain Resetting

R

Rob Bazinet

Hello all;

I have an ASP.NET application which I run part of it in a new thread. The
part running is very processor and time intensive and takes an hour plus to
complete.

The problem I am experiencing is after the thread has been running for about
20 min it stops. I am running this app on a Windows 2003 server and SQL
Server 2000 on the backend. I suspect it may be a SessionState time out
issue and I have played with the settings at the server and app level on IIS
and in the machine.config, increasing all values from the default value of
20 min to 120 min in the hopes it would work. I did get the process to run
for 60 min one time AFTER increasing the timeout to 120 min but the process
is stopping at about 20 min again.

Anyone have any insight into this and can help it would be appreciated.

Thanks in advance,
Rob Bazinet
 
S

Scott Allen

In the IIS MMC, check the "Shutdown worker process if idle for X
minutes setting". Go to Application pools, right click and select
Properties for the pool your application runs in. This setting is the
first on the Performance tab.
 
R

Rob Bazinet

Scott,

Well, the setting is 20 min., which is the magic number but....it is
indicating idle time and I wouldn't think the worker process would be idle
at this point. Am I interpreting this setting incorrectly??? If I start
my process and watch utilization on w3wp.exe it is running at about 70-80%
the entire time. What am I missing??

Thanks,
Rob
 
B

bruce barker

idle means no requests

-- bruce (sqlwork.com)


| Scott,
|
| Well, the setting is 20 min., which is the magic number but....it is
| indicating idle time and I wouldn't think the worker process would be idle
| at this point. Am I interpreting this setting incorrectly??? If I start
| my process and watch utilization on w3wp.exe it is running at about 70-80%
| the entire time. What am I missing??
|
| Thanks,
| Rob
|
| | > In the IIS MMC, check the "Shutdown worker process if idle for X
| > minutes setting". Go to Application pools, right click and select
| > Properties for the pool your application runs in. This setting is the
| > first on the Performance tab.
| >
| > --
| > Scott
| > http://www.OdeToCode.com/blogs/scott/
| >
| > On Mon, 22 Nov 2004 14:19:51 -0500, "Rob Bazinet"
| >
| >>Hello all;
| >>
| >>I have an ASP.NET application which I run part of it in a new thread.
The
| >>part running is very processor and time intensive and takes an hour plus
| >>to
| >>complete.
| >>
| >>The problem I am experiencing is after the thread has been running for
| >>about
| >>20 min it stops. I am running this app on a Windows 2003 server and SQL
| >>Server 2000 on the backend. I suspect it may be a SessionState time out
| >>issue and I have played with the settings at the server and app level on
| >>IIS
| >>and in the machine.config, increasing all values from the default value
of
| >>20 min to 120 min in the hopes it would work. I did get the process to
| >>run
| >>for 60 min one time AFTER increasing the timeout to 120 min but the
| >>process
| >>is stopping at about 20 min again.
| >>
| >>Anyone have any insight into this and can help it would be appreciated.
| >>
| >>Thanks in advance,
| >> Rob Bazinet
| >>
| >
|
|
 
S

Scott Allen

As bruce pointed out, you'll need incoming requests to keep the app
alive (or change / disable the setting).
 
R

Rob Bazinet

Thank you to both of you for the replies. It worked great. I had never had
a long running process like this and it was a learning experience.

-Rob
 
R

Rick Strahl [MVP]

Hi Rob,

I see that Scott and Bruce have pointed you in the right direction for the
actual problem.

But I would suggest that you think about some async mechanism to actually
run your requests if they are taking this long. Start up a new thread or an
Async HTTP Handler, or better yet run this operation in a separate
process/machine.

Long Web Requests, because of the ASP.NET thread pool, are ggenerally not a
good idea as they can cause a variety of problems including these timeouts.
If somebody hits that request more than once you're going to kill the
machine most likely for example.

+++ Rick ---

--

Rick Strahl
West Wind Technologies
http://www.west-wind.com/
http://www.west-wind.com/weblog/
http://www.west-wind.com/wwThreads/
 
R

Rob Bazinet

Rick,

Great suggestions. Do you have an resources you can point me to? I wasn't
sure what approach to take with my long running process and the thread
seemed to be a solution but if you have something better I would be glad to
try it.

Thanks,
Rob
 
R

Rob Bazinet

Rick,

Actually, I am starting a new thread for my long running process. Are you
referring to some other approach?

I am not familiar with Async Handlers but I will look into them.

Thanks,
Rob
 

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

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top