473,397 Members | 1,974 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

ASP startup/shutdown questions - this shouldn't be happening... (MVPs?)

In trying to improve the throughput of a classic ASP app I wrote a few
years ago, I added monitoring to the application and session start and
end methods. I'm counting the total number of sessions and the high
water mark. The results are puzzling to me.

In Application_OnStart, I clear the current and highwater session
counts, and write an app startup event to my app log file (a text
file). In Application_OnEnd, I write an app shutdown complete event to
the log. In Session_OnStart, I bump the current count (an app
variable), and write a session start event with the current and
maximum count to the log. In Session_OnEnd, I decrement the current
cound and write a session shutdown event with the current and maximum
count to the log. All app log writing and session count calculations
are done with Application.Lock in effect.

Observations and questions:

1. In the log file, it appears that the ASP application is being
shutdown and restarted almost daily. I see startup events logged as
well as shutdown events. The hosting company swears that neither the
machine (shared server) nor IIS nor the application is being
restarted. Is there any other way that the Application_OnStart and
_OnEnd methods might be invoked that would explain this?

2. I found in the log file that apparently one invocation of the app
was being shutdown while a new one was being started. The app startup
event for the new run was logged before the Shutdown Complete event
was logged (in the same file) for the old run. The session startup
events in the app log are interspersed with the session shutdown
events. Each event includes the current number of sessions and the
high water mark, so I can see the session count going down with the
shutdown events, while a different session count is going up with the
startup events. How is this possible?

Thanks
tbone
Feb 4 '06 #1
3 1587
tbone wrote:

1. In the log file, it appears that the ASP application is being
shutdown and restarted almost daily. I see startup events logged as
well as shutdown events. The hosting company swears that neither the
machine (shared server) nor IIS nor the application is being
restarted. Is there any other way that the Application_OnStart and
_OnEnd methods might be invoked that would explain this?
If the global.asa file is modified, the application will restart.
2. I found in the log file that apparently one invocation of the app
was being shutdown while a new one was being started. The app startup
event for the new run was logged before the Shutdown Complete event
was logged (in the same file) for the old run. The session startup
events in the app log are interspersed with the session shutdown
events. Each event includes the current number of sessions and the
high water mark, so I can see the session count going down with the
shutdown events, while a different session count is going up with the
startup events. How is this possible?


One thing: you can't always depend on session_onend firing when you expect
it to:
http://www.aspfaq.com/show.asp?id=2078

You may want to direct these questions to the .inetserver.iis group.
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Feb 4 '06 #2
Bob, thanks for the info.

On Sat, 4 Feb 2006 10:54:26 -0500, "Bob Barrows [MVP]"
<re******@NOyahoo.SPAMcom> wrote:
tbone wrote:

1. In the log file, it appears that the ASP application is being
shutdown and restarted almost daily. I see startup events logged as
well as shutdown events. The hosting company swears that neither the
machine (shared server) nor IIS nor the application is being
restarted. Is there any other way that the Application_OnStart and
_OnEnd methods might be invoked that would explain this?

If the global.asa file is modified, the application will restart.
2. I found in the log file that apparently one invocation of the app
was being shutdown while a new one was being started. The app startup
event for the new run was logged before the Shutdown Complete event
was logged (in the same file) for the old run. The session startup
events in the app log are interspersed with the session shutdown
events. Each event includes the current number of sessions and the
high water mark, so I can see the session count going down with the
shutdown events, while a different session count is going up with the
startup events. How is this possible?


One thing: you can't always depend on session_onend firing when you expect
it to:
http://www.aspfaq.com/show.asp?id=2078

You may want to direct these questions to the .inetserver.iis group.

Feb 5 '06 #3
http://blogs.msdn.com/david.wang/arc...s_on_IIS6.aspx

Thanks to David Wang for what appears to be the explanation.
Feb 9 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: The Jetman | last post by:
I'm reading source code, but I haven't found any examples of how to simply shutdown my XML-RPC server. I've done some nice things w/ it so far. I can upload and dload arbitrary files, remotely...
8
by: Jonathan Heath | last post by:
Hi all, I have created an ASP script that enters data into an Access Database. My problem is that I'd like this script to run when the computer is shutdown or the user logs off. I think...
7
by: Lynn | last post by:
I'm running Oracle 8.1.7.4.1 on W2K and have the services for my oracle instances set to automatically startup and shutdown with the W2K server. Unfortunately, neither is working. Nothing gets...
1
by: Bob Weisenburger | last post by:
If a user starts up access while holding down the shift key, the database will open without going to the startup form. This allows the user to actually open a table and change data that he would...
5
by: Stephen Lamb | last post by:
I have a background worker thread which I start from a form's HandleCreated event that makes calls back to the form using Invoke. During shutdown the form is disposed and the background worker...
4
by: FB's .NET Dev PC | last post by:
On one PC, I have several services, all of which need to run, some of which I am writing, and some of which (such as SQL server) I am not writing. My overall goal is to have a restartable, stable...
13
by: Thomas Mlynarczyk | last post by:
Hi, I have this code: class Test { public $status = 'dead'; function __construct() { $this->status = 'alive'; } function __destruct() { echo '<br>__destruct()'; } }
6
by: shaileshkumar | last post by:
iam able to startup & shutdown tomcat server from the bin directory. But when i have copied the same files on to the desktop,iam unable to do so. my operating system is xp. (i have copied...
1
by: theands | last post by:
Hello everyone I was wondering if someone can assist me. I just installed a fresh copy of debian etch on a server that was previously running windows. Startup time of the server is roughly an...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.