Groups | Blog | Home
all groups > asp.net > january 2004 >

asp.net : Shut down of asp.net process.


Hermit Dave
1/11/2004 11:27:16 PM
the way asp.net worker process is handled and shutdown or restarted is
governed by machine.config file....

have a look into the different params for this purpose

http://www.aspalliance.com/articleViewer.aspx?aId=226&pId=-1

http://www.codeproject.com/aspnet/aspwp.asp



--
Regards,

HD

[quoted text, click to view]

Anders Both
1/11/2004 11:50:47 PM
If no pages in my asp.net web-system, is being requested for some periode,
it seems like the asp.net process is shut down automaticaly. Is this a
normal behavior, or does my system contains some kind of bug or wrong
configuration ?

I don´t want my asp.net process to ever shut down, because I want to keep
data, object etc, in ram.

I hope someone can give me good advices.

Best regards, Anders Both, Denmark.


Hermit Dave
1/12/2004 1:44:07 AM
you are welcome.

try using ProcessModelInfo class and ProcessInfo class
this is what they look like

public class ProcessModelInfo
{
public static ProcessInfo GetCurrentProcessInfo();
public static ProcessInfo[] GetHistory(int num);
}

public class ProcessInfo
{
public TimeSpan Age { get; }
public int PeakMemoryUsed { get; }
public int ProcessID { get; }
public int RequestCount {get; }
public ProcessShutDownReason ShutdownReason { get; }
public DateTime StateTime { get; }
public ProcessStatus Status { get; }
}

have fun....

Info from Essential ASP.NET... nice book...

--
Regards,

HD

[quoted text, click to view]

Anders Both
1/12/2004 2:16:14 AM
Thx, Alot.

But if the process has been shut down, how can I then found out why this
happend? Can this resson be registret in the Application_EndRequest Method ?

Best Regards Anders Both

My processModel settings are as follows:

<processModel
enable="true"
timeout="Infinite"
idleTimeout="Infinite"
shutdownTimeout="0:00:05"
requestLimit="Infinite"
requestQueueLimit="5000"
restartQueueLimit="10"
memoryLimit="60"
webGarden="false"
cpuMask="0xffffffff"
userName="machine"
password="AutoGenerate"
logLevel="Errors"
clientConnectedCheck="0:00:05"
comAuthenticationLevel="Connect"
comImpersonationLevel="Impersonate"
responseDeadlockInterval="00:03:00"
maxWorkerThreads="20"
maxIoThreads="20"
/>

[quoted text, click to view]

Anders Both
1/13/2004 2:38:37 AM
Thx, wery usefull.

But can I register what casued that the process was shut down. My problem is
that my process just shut´s down, and i don´t know why.
e.g in global.asax.cs Application_End() ?

My processModel setting are below. (they are still the default settings for
W2K3)

BR Anders Both
<processModel enable="true" timeout="Infinite" idleTimeout="Infinite"
shutdownTimeout="0:00:05" requestLimit="Infinite" requestQueueLimit="5000"
restartQueueLimit="10" memoryLimit="60" webGarden="false"
cpuMask="0xffffffff" userName="machine" password="AutoGenerate"
logLevel="Errors" clientConnectedCheck="0:00:05"
comAuthenticationLevel="Connect" comImpersonationLevel="Impersonate"
responseDeadlockInterval="00:03:00" maxWorkerThreads="20"
maxIoThreads="20"/>

[quoted text, click to view]

Hermit Dave
1/13/2004 7:22:18 AM
dont know if you can use the in application_End()
just give it a try.. no harm.... (there are ample ways i can think of where
application would be terminated - kill the worker process and
application_end would never be called)

if its not getting called... put the code in Application_State()
in your global asax...

you could potentially have it at both places to maintain an audit trail of
startup... shutdown events

--
Regards,

HD

[quoted text, click to view]

AddThis Social Bookmark Button