473,396 Members | 1,693 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,396 software developers and data experts.

How to create an immortal web app?

Sorry if this is a crosspost - I think I put this in the wrong group
before.

I have an asp.net app that takes a few minutes to start on the server
site (unavoidable) but once running it processes requests and serves
data to the client quickly.

Once started, I hold the app in memory using Application variables.
This is working great, and after the first session starts, subsequent
sessions have access to the (already started) app and the requests get
processed quickly.

My problem is that the Application variables seem to have dissapeared
when I get to work in the morning (I actually don't know what time the
app stops, but during my workday it doesn't happen so I think the
Application variables are persisting for a few hours anyway).

I'm having trouble finding documentation on the lifecycle of
Application variables, the Application_End event, etc.

Can (and should) I keep my app alive indefinitely? Is this something I
set in global.asax (like I do with Session variables), should I look
for some IIS settings? Should I take a different strategy maybe and
restart the app on a schedule?

Thanks!

Mar 8 '06 #1
6 1062
Does it only die under win2003 but not under winXP?

<da******@daykirby.com> wrote in message
news:11**********************@p10g2000cwp.googlegr oups.com...
Sorry if this is a crosspost - I think I put this in the wrong group
before.

I have an asp.net app that takes a few minutes to start on the server
site (unavoidable) but once running it processes requests and serves
data to the client quickly.

Once started, I hold the app in memory using Application variables.
This is working great, and after the first session starts, subsequent
sessions have access to the (already started) app and the requests get
processed quickly.

My problem is that the Application variables seem to have dissapeared
when I get to work in the morning (I actually don't know what time the
app stops, but during my workday it doesn't happen so I think the
Application variables are persisting for a few hours anyway).

I'm having trouble finding documentation on the lifecycle of
Application variables, the Application_End event, etc.

Can (and should) I keep my app alive indefinitely? Is this something I
set in global.asax (like I do with Session variables), should I look
for some IIS settings? Should I take a different strategy maybe and
restart the app on a schedule?

Thanks!

Mar 8 '06 #2
Check the IIS settings for the application pool that the application is
running in (in IIS6 only, go to the app pool, right click, properties).
You can modify the timeout values and recycling values so that your
application won't recycle itself. I would think it would be a good
idea to restart the app every now and then.

HTH,
Darren Kopp
http://blog.secudocs.com/

Mar 8 '06 #3
HK
Why would he want to restart the app every now and then? Managed code is
perfect! :)
"Darren Kopp" <da********@gmail.com> wrote in message
news:11**********************@i39g2000cwa.googlegr oups.com...
Check the IIS settings for the application pool that the application is
running in (in IIS6 only, go to the app pool, right click, properties).
You can modify the timeout values and recycling values so that your
application won't recycle itself. I would think it would be a good
idea to restart the app every now and then.

HTH,
Darren Kopp
http://blog.secudocs.com/

Mar 8 '06 #4
An ASP.Net application times out, just as the Session times out. The
difference is that Session times out (default) 20 minutes after the last
request from a given client. The Application times out (default) 20 minutes
after the last request from *any* client.

It is important to understand that no in-memory data is safe from
application re-starts, as even if the Application did not time out, there
would be times when the server would need to be re-started for any number of
reasons (such as a power failure). You need to handle these situations
gracefully in any application.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer

Presuming that God is "only an idea" -
Ideas exist.
Therefore, God exists.

<da******@daykirby.com> wrote in message
news:11**********************@p10g2000cwp.googlegr oups.com...
Sorry if this is a crosspost - I think I put this in the wrong group
before.

I have an asp.net app that takes a few minutes to start on the server
site (unavoidable) but once running it processes requests and serves
data to the client quickly.

Once started, I hold the app in memory using Application variables.
This is working great, and after the first session starts, subsequent
sessions have access to the (already started) app and the requests get
processed quickly.

My problem is that the Application variables seem to have dissapeared
when I get to work in the morning (I actually don't know what time the
app stops, but during my workday it doesn't happen so I think the
Application variables are persisting for a few hours anyway).

I'm having trouble finding documentation on the lifecycle of
Application variables, the Application_End event, etc.

Can (and should) I keep my app alive indefinitely? Is this something I
set in global.asax (like I do with Session variables), should I look
for some IIS settings? Should I take a different strategy maybe and
restart the app on a schedule?

Thanks!

Mar 8 '06 #5
Thanks for the info/advice, everybody!

I don't have much experience with Web Servcies yet, but wouldn't I have
the same problem - the web service would take a while to initialize the
first time and would need to be restarted regularly? Obviously I have
some research to do...

Kevin makes a good point that there are going to be unavoidable cases
when the app needs to be restarted. This makes me think that I'd love
to have a way that it restarts itself, without a request from a client.
Can anyone point me in the right direction to learn how to do this?

Thanks again,
Day

Mar 8 '06 #6
Well, at the easiest end of the spectrum, you could just make a
scheduled task that runs iisreset, if that is possible for you to reset
the entire iis process. If that's not possible, you could probably
make a scheduled task that runs a batch file or executable that
restarts the individual app through IIS (sorry, I don't know what that
command would be).

HTH,
Darren Kopp
http://blog.secudocs.com/

Mar 9 '06 #7

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

Similar topics

5
by: Arthur T. Murray | last post by:
http://www.scn.org/~mentifex/jsaimind.html is a free, public-domain AI in JavaScript that may be copied to your Web site with your own changes. Freshly updated and modified from the AI Mind-1.1...
6
by: Arthur T. Murray | last post by:
http://www.scn.org/~mentifex/jsaimind.html is a free, public-domain AI in JavaScript that may be copied to your Web site with your own changes. Freshly updated and modified from the AI Mind-1.1...
4
by: I_AM_DON_AND_YOU? | last post by:
There is one more problem I am facing but didn't get the solution. In my Setup Program I am not been able to create 2 things (when the program is intalled on the client machine ) : (1) create...
18
by: Steven Bethard | last post by:
I've updated the PEP based on a number of comments on comp.lang.python. The most updated versions are still at: http://ucsu.colorado.edu/~bethard/py/pep_create_statement.txt...
25
by: Licheng Fang | last post by:
I mean, all the class instances that equal to each other should be reduced into only one instance, which means for instances of this class there's no difference between a is b and a==b. Thank...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
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
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,...

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.