Hmmm, I had replied the other day, but it seems never to have shown up in
this thread - let me try this again:
Thanks for your quick reply Mark.
Indeed, I had noticed that many of these shutdowns occurred after a period
of inactivity that seems to correspond with the session timeout I've set.
However, there are definitely times when this occurs during periods of
frequent activity, even with the relatively long timeout I've set.
A couple of questions regarding the second reason you presented:
1. This application is on a hosted solution (GoDaddy), so there are likely a
number of other applications on the server. When you say it is recycling
the application because it has hit a wall, do you mean that the resource
usage of my application has exceeded quota, or would this also happen
because of a system-wide condition?
2. I would like to take some metrics of my application's use of resources to
make sure I don't have a leak going on, but because I am on a shared host my
options seem to be limited. I have managed to access static methods of
ThreadPool to check on our thread usage, because I was concerned about our
use of a one-way web service to perform long running background tasks, but
I've never seen available threads drop below 395 out of 400, so I'm not
eating up the thread pool. What other metrics might I be able to attain in
a restricted environment, in particular I would like to get an idea of what
our memory footprint and CPU time are about. Unfortunately, all attempts
I've made to access the performance counters seem to be blocked, so that
route is out.....
Thanks for your help.
--
Robert Dunlop
----------------
http://www.directxzone.org http://rdunlop.spaces.live.com/
Microsoft DirectX MVP 1998-2006
"Mark Fitzpatrick" <ma******@fitzme.comwrote in message
news:u8*************@TK2MSFTNGP04.phx.gbl...
Hi Robert,
The Application_End event will fire whenever the application is shut down,
which you already know. There are reasons why the application will shut
down that have nothing to do with errors. The first is that simply nobody
has visited the site in roughly 20 minutes. Usually this period of time
corresponds to the session timeout value. So, 20 minutes after the last
person's session has been destroyed due to inactivity, the application is
shut down to perform garbage collection and regain resources (not to
mention just to keep an unused application off the system until it's
needed again).
The second reason is the application pool has recycled. This means that
the system has hit a wall with regards to the amount of memory that the
application can use and needs to be shut down, perform garbage collection,
and restart with fresh resources.
In my experience, neither of these conditions will result in an error
since they are technically normal operation of the server.