M
mail747097
I would like to keep IIS alive on my web site and prevent
Application_End from occuring in global.asax. Any ideas?
Application_End from occuring in global.asax. Any ideas?
You don't want to do that.
Application recycling is of great help in managing server resources, particularly RAM.
If you prevent Application recycling from occurring, you'll see a progressive memory load
which will cause deterioration of the server's capacity to respond to requests, and you
might even see a total failure of the server.
If your server's memory load isn't excessive, you might want to consider
scheduling application recyclings so they occur at the time your server
gets the least number of requests ( usually, between midnight and 4am ).
Juan T. Llibre, asp.net MVP
asp.net faq :http://asp.net.do/faq/
foros de asp.net, en español :http://asp.net.do/foros/
- Visa citerad text -
You don't want to do that.
Application recycling is of great help in managing server resources, particularly RAM.
If you prevent Application recycling from occurring, you'll see a progressive memory load
which will cause deterioration of the server's capacity to respond to requests, and you
might even see a total failure of the server.
If your server's memory load isn't excessive, you might want to consider
scheduling application recyclings so they occur at the time your server
gets the least number of requests ( usually, between midnight and 4am ).
Juan T. Llibre, asp.net MVP
asp.net faq :http://asp.net.do/faq/
foros de asp.net, en español :http://asp.net.do/foros/
- Visa citerad text -
re:
!> if I succeed to keep the application alive I would not mind
!> recycling the application pool at night
You cannot keep an application "alive" if it ends.
All you can do is restart it after it ends.
re:
!> I have discovered that when Application_End occurs the workflow stops too
That behavior is by design. It's supposed to work that way.
Otherwise the memory resources can't be disposed of, so a clean slate occurs.
re:
!> I have tried to manually load a page from the web site and then the workflow starts up again.
You can setup a batch file which does that, which you can schedule at your lowest-traffic time.
That batch file could include :
1. the application recycling ( or, perhaps, even, a complete IIS reset )
2. the loading of a page, or several pages, from the web site so the workflow starts up again
Windows Scheduler can do that quite easily.
In the morning, all you'd have to do is close the server's browser
...or you could kill iexplore.exe's process programmatically ( using another scheduled process ).
Juan T. Llibre, asp.net MVP
asp.net faq :http://asp.net.do/faq/
foros de asp.net, en español :http://asp.net.do/foros/
Thanks for yor answer. I can imagine that if I extend the timeout for
each session so they live forever it could mean the total failure of
the server. However I would just like to keep one instance alive or
find some other way to reload it so Application_End do not occur. Or
to restart it when it occurs.
I do not see how recycling the application pool would accomplish this.
Ok if I succeed to keep the application alive I would not mind
recycling the application pool at night.
Some background. I have a workflow that is published as a webservice
and I have discovered that when Application_End occurs the workflow
stops too. I have tried to manually load a page from the web site and
then the workflow starts up again. I have added some code to
Application_Start and Application_End to start and stop the WWF
engine.- Dölj citerad text -
- Visa citerad text -
re:
!> if I succeed to keep the application alive I would not mind
!> recycling the application pool at night
You cannot keep an application "alive" if it ends.
All you can do is restart it after it ends.
re:
!> I have discovered that when Application_End occurs the workflow stops too
That behavior is by design. It's supposed to work that way.
Otherwise the memory resources can't be disposed of, so a clean slate occurs.
re:
!> I have tried to manually load a page from the web site and then the workflow starts up again.
You can setup a batch file which does that, which you can schedule at your lowest-traffic time.
That batch file could include :
1. the application recycling ( or, perhaps, even, a complete IIS reset )
2. the loading of a page, or several pages, from the web site so the workflow starts up again
Windows Scheduler can do that quite easily.
In the morning, all you'd have to do is close the server's browser
...or you could kill iexplore.exe's process programmatically ( using another scheduled process ).
Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
Thanks for yor answer. I can imagine that if I extend the timeout for
each session so they live forever it could mean the total failure of
the server. However I would just like to keep one instance alive or
find some other way to reload it so Application_End do not occur. Or
to restart it when it occurs.
I do not see how recycling the application pool would accomplish this.
Ok if I succeed to keep the application alive I would not mind
recycling the application pool at night.
Some background. I have a workflow that is published as a webservice
and I have discovered that when Application_End occurs the workflow
stops too. I have tried to manually load a page from the web site and
then the workflow starts up again. I have added some code to
Application_Start and Application_End to start and stop the WWF
engine.- Dölj citerad text -
- Visa citerad text -
re:
!> It is important that this site does not affect other sites on the web
!> server so I can not for example execute iisreset at a regular interval.
Place the app in its own Application Pool...and only recycle *that* Application Pool.
A simple procedure to do that is described here:http://blogs.iis.net/chrisad/archive/2006/08/30/Recycling-Application...
Another way to do that is described here :http://www.microsoft.com/technet/technetmag/issues/2005/11/InsideMSCOM/
( recycleapps.vbs <server_name> <apppool_name> )
Recycleapps.vbs is included in this download :http://download.microsoft.com/download/f/d/0/fd05def7-68a1-4f71-8546-...
If you're not using IIS 6.0, you can open the application's web.config inNotepad,
and use SendKeys to send an <enter> and save the file afterwards...or youcan
run an ASP.NET file which does that programmatically, using the
You can schedule *that*, too.
Juan T. Llibre, asp.net MVP
asp.net faq :http://asp.net.do/faq/
foros de asp.net, en español :http://asp.net.do/foros/
It is important that this site does not affect other sites on the web
server so I can not for example execute iisreset at a regular
interval. Yes I can create a batch file or a Windows service that
retrieves a web page from the site at for example every 5 minutes.
However I was hoping for a better solution.- Dölj citerad text -
- Visa citerad text -
re:
!> It is important that this site does not affect other sites on the web
!> server so I can not for example execute iisreset at a regular interval.
Place the app in its own Application Pool...and only recycle *that* Application Pool.
A simple procedure to do that is described
here:http://blogs.iis.net/chrisad/archive/2006/08/30/Recycling-Application...
Another way to do that is described here
:http://www.microsoft.com/technet/technetmag/issues/2005/11/InsideMSCOM/
( recycleapps.vbs <server_name> <apppool_name> )
Recycleapps.vbs is included in this download
:http://download.microsoft.com/download/f/d/0/fd05def7-68a1-4f71-8546-...
If you're not using IIS 6.0, you can open the application's web.config in Notepad,
and use SendKeys to send an <enter> and save the file afterwards...or you can
run an ASP.NET file which does that programmatically, using the
You can schedule *that*, too.
Juan T. Llibre, asp.net MVP
asp.net faq :http://asp.net.do/faq/
foros de asp.net, en español :http://asp.net.do/foros/
It is important that this site does not affect other sites on the web
server so I can not for example execute iisreset at a regular
interval. Yes I can create a batch file or a Windows service that
retrieves a web page from the site at for example every 5 minutes.
However I was hoping for a better solution.- Dölj citerad text -
- Visa citerad text -