473,836 Members | 1,504 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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_OnS tart, I clear the current and highwater session
counts, and write an app startup event to my app log file (a text
file). In Application_OnE nd, 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.Loc k 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_OnS tart 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 1606
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_OnS tart 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******@NOyah oo.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_OnS tart 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
4041
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 execute sys commands, etc. But I now want to use this code in a production project and essentially control a FreeBSD box from a MSOFT Access DB application. But the only Python fn I haven't been able to coerce into submission is sys.exit() ! ...
8
2772
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 this would be simple enough if the ASP didn't have any user input, but it does.
7
6974
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 logged in my alert file for the shutdown or startup, however, the databases are down and when I manually start them up, the alert log reveals a crash recovery. I've verified the settings in the registry for automatic shutdown and startup. I've...
1
3236
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 not normally be able to change. His user name would not allow him to open a form that give him access to all fields in a record. Normally he is restricted to a form that only shows fields that he is allowed to change. Is there a way to keep...
5
8121
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 thread is aborted by the system. How is one to keep the background thread from calling form.Invoke after the form's window handle has been destroyed? This is definitely happening in my application. I haven't read anything about this problem in...
4
7030
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 system. One of my services is a "system monitor" which controls the startup of the other services I am writing, based on the SQL server having started. I am using WMI to monitor services, and System.ServiceProcess.ServiceController to start...
13
2690
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
2692
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 startup.bat,shutdown.bat -MSDOS files). What additional path settings i have to do?. please help.
1
3103
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 hour. Which is unacceptable for a production server. The server hangs on "Uniform cd-rom driver revision:3.20". If I remove the cd-rom drive, the server willl still hang but on another device it is trying to load. While trying to shutdown the...
0
9820
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9670
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10548
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10591
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9374
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7792
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6979
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5826
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3115
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.