Connecting Tech Pros Worldwide Forums | Help | Site Map

session variables, Timeout and Recycling

Ed
Guest
 
Posts: n/a
#1: Jul 10 '06
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





Karl Seguin [MVP]
Guest
 
Posts: n/a
#2: Jul 10 '06

re: session variables, Timeout and Recycling


1 - Yes...it'll timeout after X time of idle..regardless 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.comwrote in message
news:DF190ADB-615D-42BC-826C-0A315B42FAF2@microsoft.com...
Quote:
>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
>
>
>
>

Ed
Guest
 
Posts: n/a
#3: Jul 10 '06

re: session variables, Timeout and Recycling


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:
Quote:
1 - Yes...it'll timeout after X time of idle..regardless 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.comwrote in message
news:DF190ADB-615D-42BC-826C-0A315B42FAF2@microsoft.com...
Quote:
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


>
>
>
Karl Seguin [MVP]
Guest
 
Posts: n/a
#4: Jul 10 '06

re: session variables, Timeout and Recycling


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.comwrote in message
news:68A8363E-3685-404F-96C6-586C9DAF8317@microsoft.com...
Quote:
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:
>
Quote:
>1 - Yes...it'll timeout after X time of idle..regardless 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.comwrote in message
>news:DF190ADB-615D-42BC-826C-0A315B42FAF2@microsoft.com...
Quote:
>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
>
>
>
>
>>
>>
>>

Ed
Guest
 
Posts: n/a
#5: Jul 18 '06

re: session variables, Timeout and Recycling


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:
Quote:
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.comwrote in message
news:68A8363E-3685-404F-96C6-586C9DAF8317@microsoft.com...
Quote:
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:
Quote:
1 - Yes...it'll timeout after X time of idle..regardless 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.comwrote in message
news:DF190ADB-615D-42BC-826C-0A315B42FAF2@microsoft.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




>
>
>
>
>
>
Karl Seguin [MVP]
Guest
 
Posts: n/a
#6: Jul 19 '06

re: session variables, Timeout and Recycling


Yes, I believe so.

Karl
--
http://www.openmymind.net/
http://www.fuelindustries.com/


"Ed" <Ed@discussions.microsoft.comwrote in message
news:CB0239B5-D55D-4917-BB0B-4CAACD09D7C4@microsoft.com...
Quote:
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:
>
Quote:
>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.comwrote in message
>news:68A8363E-3685-404F-96C6-586C9DAF8317@microsoft.com...
Quote:
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..regardless 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.comwrote in message
>news:DF190ADB-615D-42BC-826C-0A315B42FAF2@microsoft.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
>
>
>
>
>>
>>
>>
>>
>>
>>

Closed Thread