473,729 Members | 2,272 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

session variables, Timeout and Recycling

Ed
I have some questions in regards to Session variables and IIS Recycling:

1. Does the IIS setting 'Shutdown worker process after being idle' affect
an
application's session variables?
Or is IIS checking that all sessions are done before shutting down the
worker processes?

2. Does the Recycle worker processes setting kill all session variables
of
any running session?

3. If I want to insure that my ASP.NET 2.0 application has a certain
timeout.
Is setting the timout values in the application sufficient, or are
there settings
in IIS that need to be set?

4. How does changing my Session store from InProc to SQL server in my
application, affect session Timeout? Would changing it allow us not to have
a timeout? (an infinite value?). Would that solve any loss of the
session variables due to process recycling, since the variables would
be in SQL tables and not in memory (inProc)?

Thanks in advance..

Ed


Jul 10 '06 #1
5 3184
1 - Yes...it'll timeout after X time of idle..regardles s of sessions or
application.

Before answering 2 and 3...

ASP.NET runs as a process (aspnet_wp.exe or w3wp.exe depending on ur OS).
The process' memory space is used for a number of things - including Cache,
Application and Session (when it's InProc). Restarting this process (known
as recycling the worker process) causes all of these items to get dumped -
and they aren't automatically recreated.

So:
#2 - Yes

#3 - Absolutely. Recycling a process only wipes the memory space for that
process. If w3wp.exe recycles, data stored someone else won't be affected -
namely, if you are using StateServer or SQL Server for your sessions, you
can recycle all you want. Personally, I find InProc sessions timeout
unpredictably and much prefer StateServer/SQL Server when it comes to this
stuff (ie, where session timeout is sensitive).

Karl

--
http://www.openmymind.net/
http://www.fuelindustries.com/
"Ed" <Ed@discussions .microsoft.comw rote in message
news:DF******** *************** ***********@mic rosoft.com...
>I have some questions in regards to Session variables and IIS Recycling:

1. Does the IIS setting 'Shutdown worker process after being idle'
affect
an
application's session variables?
Or is IIS checking that all sessions are done before shutting down
the
worker processes?

2. Does the Recycle worker processes setting kill all session variables
of
any running session?

3. If I want to insure that my ASP.NET 2.0 application has a certain
timeout.
Is setting the timout values in the application sufficient, or are
there settings
in IIS that need to be set?

4. How does changing my Session store from InProc to SQL server in my
application, affect session Timeout? Would changing it allow us not to
have
a timeout? (an infinite value?). Would that solve any loss of the
session variables due to process recycling, since the variables
would
be in SQL tables and not in memory (inProc)?

Thanks in advance..

Ed


Jul 10 '06 #2
Ed
Karl -

Thank you for your reply.

I would like to understand better the 'Shutdown worker process after being
idle'
choice. What does idle mean? Does'nt an ASP.NET running cause
aspnet_wp.exe or w3wp.exe not to be idle? and therefore safe from being
shut down by this choice?

- Ed
"Karl Seguin [MVP]" wrote:
1 - Yes...it'll timeout after X time of idle..regardles s of sessions or
application.

Before answering 2 and 3...

ASP.NET runs as a process (aspnet_wp.exe or w3wp.exe depending on ur OS).
The process' memory space is used for a number of things - including Cache,
Application and Session (when it's InProc). Restarting this process (known
as recycling the worker process) causes all of these items to get dumped -
and they aren't automatically recreated.

So:
#2 - Yes

#3 - Absolutely. Recycling a process only wipes the memory space for that
process. If w3wp.exe recycles, data stored someone else won't be affected -
namely, if you are using StateServer or SQL Server for your sessions, you
can recycle all you want. Personally, I find InProc sessions timeout
unpredictably and much prefer StateServer/SQL Server when it comes to this
stuff (ie, where session timeout is sensitive).

Karl

--
http://www.openmymind.net/
http://www.fuelindustries.com/
"Ed" <Ed@discussions .microsoft.comw rote in message
news:DF******** *************** ***********@mic rosoft.com...
I have some questions in regards to Session variables and IIS Recycling:

1. Does the IIS setting 'Shutdown worker process after being idle'
affect
an
application's session variables?
Or is IIS checking that all sessions are done before shutting down
the
worker processes?

2. Does the Recycle worker processes setting kill all session variables
of
any running session?

3. If I want to insure that my ASP.NET 2.0 application has a certain
timeout.
Is setting the timout values in the application sufficient, or are
there settings
in IIS that need to be set?

4. How does changing my Session store from InProc to SQL server in my
application, affect session Timeout? Would changing it allow us not to
have
a timeout? (an infinite value?). Would that solve any loss of the
session variables due to process recycling, since the variables
would
be in SQL tables and not in memory (inProc)?

Thanks in advance..

Ed




Jul 10 '06 #3
Each request made to IIS is handled by it's own thread. There's a main
program that just listens to port 80, gets the request and spawns off a
thread to handle it, the goes back to listening for the next request.

I can't say for sure, but I'd say that "idle" in this case refers to the
maximum amount of time a new request is made. You could characterize it as
any activitty on your site also :)

Karl

--
http://www.openmymind.net/
http://www.fuelindustries.com/
"Ed" <Ed@discussions .microsoft.comw rote in message
news:68******** *************** ***********@mic rosoft.com...
Karl -

Thank you for your reply.

I would like to understand better the 'Shutdown worker process after being
idle'
choice. What does idle mean? Does'nt an ASP.NET running cause
aspnet_wp.exe or w3wp.exe not to be idle? and therefore safe from being
shut down by this choice?

- Ed
"Karl Seguin [MVP]" wrote:
>1 - Yes...it'll timeout after X time of idle..regardles s of sessions or
application.

Before answering 2 and 3...

ASP.NET runs as a process (aspnet_wp.exe or w3wp.exe depending on ur OS).
The process' memory space is used for a number of things - including
Cache,
Application and Session (when it's InProc). Restarting this process
(known
as recycling the worker process) causes all of these items to get
dumped -
and they aren't automatically recreated.

So:
#2 - Yes

#3 - Absolutely. Recycling a process only wipes the memory space for that
process. If w3wp.exe recycles, data stored someone else won't be
affected -
namely, if you are using StateServer or SQL Server for your sessions, you
can recycle all you want. Personally, I find InProc sessions timeout
unpredictabl y and much prefer StateServer/SQL Server when it comes to
this
stuff (ie, where session timeout is sensitive).

Karl

--
http://www.openmymind.net/
http://www.fuelindustries.com/
"Ed" <Ed@discussions .microsoft.comw rote in message
news:DF******* *************** ************@mi crosoft.com...
>I have some questions in regards to Session variables and IIS Recycling:

1. Does the IIS setting 'Shutdown worker process after being idle'
affect
an
application's session variables?
Or is IIS checking that all sessions are done before shutting down
the
worker processes?

2. Does the Recycle worker processes setting kill all session
variables
of
any running session?

3. If I want to insure that my ASP.NET 2.0 application has a certain
timeout.
Is setting the timout values in the application sufficient, or
are
there settings
in IIS that need to be set?

4. How does changing my Session store from InProc to SQL server in
my
application, affect session Timeout? Would changing it allow us not to
have
a timeout? (an infinite value?). Would that solve any loss of
the
session variables due to process recycling, since the variables
would
be in SQL tables and not in memory (inProc)?

Thanks in advance..

Ed




Jul 10 '06 #4
Ed
Karl -

Do ASP.NET 1.1 apps behave the same way as ASP.NET 2.0 applications when
placed
in a application pool? Are the worker processes for the ASP.NET 1.1 app
effected by the the various Recyle worker process settings?

Thanks...Ed


"Karl Seguin [MVP]" wrote:
Each request made to IIS is handled by it's own thread. There's a main
program that just listens to port 80, gets the request and spawns off a
thread to handle it, the goes back to listening for the next request.

I can't say for sure, but I'd say that "idle" in this case refers to the
maximum amount of time a new request is made. You could characterize it as
any activitty on your site also :)

Karl

--
http://www.openmymind.net/
http://www.fuelindustries.com/
"Ed" <Ed@discussions .microsoft.comw rote in message
news:68******** *************** ***********@mic rosoft.com...
Karl -

Thank you for your reply.

I would like to understand better the 'Shutdown worker process after being
idle'
choice. What does idle mean? Does'nt an ASP.NET running cause
aspnet_wp.exe or w3wp.exe not to be idle? and therefore safe from being
shut down by this choice?

- Ed
"Karl Seguin [MVP]" wrote:
1 - Yes...it'll timeout after X time of idle..regardles s of sessions or
application.

Before answering 2 and 3...

ASP.NET runs as a process (aspnet_wp.exe or w3wp.exe depending on ur OS).
The process' memory space is used for a number of things - including
Cache,
Application and Session (when it's InProc). Restarting this process
(known
as recycling the worker process) causes all of these items to get
dumped -
and they aren't automatically recreated.

So:
#2 - Yes

#3 - Absolutely. Recycling a process only wipes the memory space for that
process. If w3wp.exe recycles, data stored someone else won't be
affected -
namely, if you are using StateServer or SQL Server for your sessions, you
can recycle all you want. Personally, I find InProc sessions timeout
unpredictably and much prefer StateServer/SQL Server when it comes to
this
stuff (ie, where session timeout is sensitive).

Karl

--
http://www.openmymind.net/
http://www.fuelindustries.com/
"Ed" <Ed@discussions .microsoft.comw rote in message
news:DF******** *************** ***********@mic rosoft.com...
I have some questions in regards to Session variables and IIS Recycling:

1. Does the IIS setting 'Shutdown worker process after being idle'
affect
an
application's session variables?
Or is IIS checking that all sessions are done before shutting down
the
worker processes?

2. Does the Recycle worker processes setting kill all session
variables
of
any running session?

3. If I want to insure that my ASP.NET 2.0 application has a certain
timeout.
Is setting the timout values in the application sufficient, or
are
there settings
in IIS that need to be set?

4. How does changing my Session store from InProc to SQL server in
my
application, affect session Timeout? Would changing it allow us not to
have
a timeout? (an infinite value?). Would that solve any loss of
the
session variables due to process recycling, since the variables
would
be in SQL tables and not in memory (inProc)?

Thanks in advance..

Ed




Jul 18 '06 #5
Yes, I believe so.

Karl
--
http://www.openmymind.net/
http://www.fuelindustries.com/
"Ed" <Ed@discussions .microsoft.comw rote in message
news:CB******** *************** ***********@mic rosoft.com...
Karl -

Do ASP.NET 1.1 apps behave the same way as ASP.NET 2.0 applications when
placed
in a application pool? Are the worker processes for the ASP.NET 1.1 app
effected by the the various Recyle worker process settings?

Thanks...Ed


"Karl Seguin [MVP]" wrote:
>Each request made to IIS is handled by it's own thread. There's a main
program that just listens to port 80, gets the request and spawns off a
thread to handle it, the goes back to listening for the next request.

I can't say for sure, but I'd say that "idle" in this case refers to the
maximum amount of time a new request is made. You could characterize it
as
any activitty on your site also :)

Karl

--
http://www.openmymind.net/
http://www.fuelindustries.com/
"Ed" <Ed@discussions .microsoft.comw rote in message
news:68******* *************** ************@mi crosoft.com...
Karl -

Thank you for your reply.

I would like to understand better the 'Shutdown worker process after
being
idle'
choice. What does idle mean? Does'nt an ASP.NET running cause
aspnet_wp.exe or w3wp.exe not to be idle? and therefore safe from
being
shut down by this choice?

- Ed
"Karl Seguin [MVP]" wrote:

1 - Yes...it'll timeout after X time of idle..regardles s of sessions
or
application.

Before answering 2 and 3...

ASP.NET runs as a process (aspnet_wp.exe or w3wp.exe depending on ur
OS).
The process' memory space is used for a number of things - including
Cache,
Application and Session (when it's InProc). Restarting this process
(known
as recycling the worker process) causes all of these items to get
dumped -
and they aren't automatically recreated.

So:
#2 - Yes

#3 - Absolutely. Recycling a process only wipes the memory space for
that
process. If w3wp.exe recycles, data stored someone else won't be
affected -
namely, if you are using StateServer or SQL Server for your sessions,
you
can recycle all you want. Personally, I find InProc sessions timeout
unpredictabl y and much prefer StateServer/SQL Server when it comes to
this
stuff (ie, where session timeout is sensitive).

Karl

--
http://www.openmymind.net/
http://www.fuelindustries.com/
"Ed" <Ed@discussions .microsoft.comw rote in message
news:DF******* *************** ************@mi crosoft.com...
I have some questions in regards to Session variables and IIS
Recycling:

1. Does the IIS setting 'Shutdown worker process after being idle'
affect
an
application's session variables?
Or is IIS checking that all sessions are done before shutting
down
the
worker processes?

2. Does the Recycle worker processes setting kill all session
variables
of
any running session?

3. If I want to insure that my ASP.NET 2.0 application has a
certain
timeout.
Is setting the timout values in the application sufficient,
or
are
there settings
in IIS that need to be set?

4. How does changing my Session store from InProc to SQL server
in
my
application, affect session Timeout? Would changing it allow us not
to
have
a timeout? (an infinite value?). Would that solve any loss of
the
session variables due to process recycling, since the
variables
would
be in SQL tables and not in memory (inProc)?

Thanks in advance..

Ed





Jul 19 '06 #6

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

Similar topics

8
21111
by: P. Glassel | last post by:
I'm having problems getting session timeouts to change programmaticlaly under IIS6.0. This is unchanged code that ran as expected under IIS5.0. Anyone else run into this problem? Thx.
7
2311
by: Adam Short | last post by:
I'm having all sorts of problems with Sessions, I've been using them for years with out a hitch, all of a sudden the last 6 - 12 months since getting our new Win2003 server it's all gone shakey!!! Our development server started life as an NT4 machine and has been simply upgraded from one operating system to the next, it is now a cross, NT4 Server, Win2000 Server, Win2003 server. All development sites work fine and under heavy stress. ...
3
4560
by: Carpe Diem | last post by:
Hello I have an aspx page that loses Session("user") value after a few minutes even after I set <sessionState mode="InProc" cookieless="false" timeout="300"> in web.config and wrote function Session_Start() { Session.Timeout = 3000; } in global.asax
2
6557
by: Lars Netzel | last post by:
There's a setting in the IIS where I have set Enabled Session Timeout to 20 minutes Then there's a setting in the WebConfig file.. <sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes" cookieless="false" timeout="20"/> Where I have set the timeout property to 20..
10
3511
by: tshad | last post by:
I have been using the default session state (InProc) and have found that I have been loosing my information after a period of time (normally 20 minutes). Is there anyway to find out how much more time I have on a session? If I do a refresh, does reset the session clock? Do you have have to go to another page to reset the session timeout or will a postback also do it? This is important as we have a few pages that a user
7
2966
by: Erik | last post by:
I have an application that uses sessions variables a lot but one I publish the application on the prod server these variables are lost. The application is written i c# 2.0 and I've set the statServer timeout to 20 min in the the web.config file. Any ideas why the variables are lost?
6
6071
by: javelin | last post by:
In ASP classic pages, I want to know if it's possible to prevent session variables from becoming zero length strings? I have tried setting the Session.Timeout to a large value, but alwas, after 20 minutes, my session variable times out. I also tried setting the session timeout in IIS manager to a high value, but this did no good either. I just want to allow one particular session variable to last a long time. Any other suggestions? \
14
2301
by: GaryDean | last post by:
The web.config in my asp.net application, running on Server2003, has this entry: <sessionState mode="InProc" timeout="40". In IIS the asp.net State Management timeout setting is 40 for my website. In IIS the virtual directory configuration setting is set to 40. The application still timesout at 20 minutes. What else can I do? --
13
2969
by: =?Utf-8?B?ZG91Zw==?= | last post by:
I support several intranet sites one of which had NO STATE. Even though content has ASP extensions, it was all rendered HTML. Site had NO session or application variables being managed. Site had no global.asa. IIS Manager had site timeout set to 20 minutes. We had to add an ASP include to pages, and that ASP include contained our first session variable. Users then started complaining of timeouts and being redirected to logout pages...
0
8761
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,...
1
9200
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
9142
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8148
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
6722
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
6022
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
4795
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2680
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2163
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.