By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,750 Members | 1,456 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,750 IT Pros & Developers. It's quick & easy.

Session loss problem

P: n/a
I've started to get session loss on many of my web apps, after only a few
minutes (the session lifespan is supposed to be 60 minutes). It occurs in
several apps (all on same server), and started happening while I was on
..NET1.1, and continues now I've moved to 2.0 (native 2.0 assemblies compiled
using VS2005, not the original VS2003 ones).

My session states are very light (most stuff is held in the db). There is
plenty of available ram on the server (400Mb free or so), worker process is
using about 180Mb. The event log shows nothing out of the ordinary (worker
recycles should be logged there, yeah?). The processors are not busy (the
server runs about 5 apps, total of 20,000-40,000 pages per day, nothing
heavy). Theres no heavy app-layer computation tying up the thread-pool
(anything taking more than 1 sec or so gets sent to it's own thread).

Can anyone suggest what the problem is?!??!!? It can't be app specific,
since it's affecting several diff ones.

(system: Windows 2000 Server fully patched, SQL 2000 sp4, .NET2.0, C#
code-behind)

Thanks,

John
Nov 21 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Your application is recycling. If you are using InProc and you
are not in a web farm, this is the mostly like reason why.

Switch to StateServer and see if the problem persists.
--
Robbe Morris - 2004/2005 Microsoft MVP C#
http://www.masterado.net

"John" <js************@ecclesdeletethiscollege.ac.uk> wrote in message
news:eg*************@TK2MSFTNGP10.phx.gbl...
I've started to get session loss on many of my web apps, after only a few
minutes (the session lifespan is supposed to be 60 minutes). It occurs in
several apps (all on same server), and started happening while I was on
.NET1.1, and continues now I've moved to 2.0 (native 2.0 assemblies
compiled using VS2005, not the original VS2003 ones).

My session states are very light (most stuff is held in the db). There is
plenty of available ram on the server (400Mb free or so), worker process
is using about 180Mb. The event log shows nothing out of the ordinary
(worker recycles should be logged there, yeah?). The processors are not
busy (the server runs about 5 apps, total of 20,000-40,000 pages per day,
nothing heavy). Theres no heavy app-layer computation tying up the
thread-pool (anything taking more than 1 sec or so gets sent to it's own
thread).

Can anyone suggest what the problem is?!??!!? It can't be app specific,
since it's affecting several diff ones.

(system: Windows 2000 Server fully patched, SQL 2000 sp4, .NET2.0, C#
code-behind)

Thanks,

John

Nov 21 '05 #2

P: n/a
Hello John,

I have also faced exactly the same problem and I think I can help you here.
In my case the web server had to serve only one web application. Robbe Morris
is correct when he said that the application is recycling. I solved the
problem by contacting microsoft engineers. Here is how i resolved the probem.

First of all the problem is caused due to application recycling. aspnet_wp
gets recycled when any of the appdomains crash due to many reason. In my case
the appdomain was crashing due to a function which got into a recurse. Due to
this the stack overflowed and it crashed the appdomain. THis in turn caused
the worker process (aspnet_wp.exe) to also recycle.

I wanted to find more information on why this is happening and found some
help from internet and thread postings here. I came to know that if any of
the appdomain in the worker process crashes, then the worker process will
recycle and along with it all other appdomains will also 'die'. that means if
you have 5 appdomain for each web app and if one appdomain crashes then all
the 4 appdomain will also cease to exist because the worker process will
recycle.

Now the question is how you will find out the cause of the recycle. The
solution is microsoft debuggers. You need to download the debuggers that will
create a dump at the time of crashing. You wil get the exact cause of crash
from the dump files. Hope this helps you !!

cheers
pradeep_tp

"Robbe Morris [C# MVP]" wrote:
Your application is recycling. If you are using InProc and you
are not in a web farm, this is the mostly like reason why.

Switch to StateServer and see if the problem persists.
--
Robbe Morris - 2004/2005 Microsoft MVP C#
http://www.masterado.net

"John" <js************@ecclesdeletethiscollege.ac.uk> wrote in message
news:eg*************@TK2MSFTNGP10.phx.gbl...
I've started to get session loss on many of my web apps, after only a few
minutes (the session lifespan is supposed to be 60 minutes). It occurs in
several apps (all on same server), and started happening while I was on
.NET1.1, and continues now I've moved to 2.0 (native 2.0 assemblies
compiled using VS2005, not the original VS2003 ones).

My session states are very light (most stuff is held in the db). There is
plenty of available ram on the server (400Mb free or so), worker process
is using about 180Mb. The event log shows nothing out of the ordinary
(worker recycles should be logged there, yeah?). The processors are not
busy (the server runs about 5 apps, total of 20,000-40,000 pages per day,
nothing heavy). Theres no heavy app-layer computation tying up the
thread-pool (anything taking more than 1 sec or so gets sent to it's own
thread).

Can anyone suggest what the problem is?!??!!? It can't be app specific,
since it's affecting several diff ones.

(system: Windows 2000 Server fully patched, SQL 2000 sp4, .NET2.0, C#
code-behind)

Thanks,

John


Nov 23 '05 #3

P: n/a
> that means if
you have 5 appdomain for each web app and if one appdomain crashes then all
the 4 appdomain will also cease to exist because the worker process will
recycle. Nope, not possible. You more than likely are running several applications
inside one appdomain. If you lose that appdomain, all your applications will
be destroyed. However, an appdomain crashing does not affect other app
domains. I'll preface this by saying this is only possible on IIS6. Lesser
versions of IIS do not run in this containment mode.

--
Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @ www.lulu.com/owc
Forth-coming VSTO.NET - Wrox/Wiley 2006
-------------------------------------------------------

"pradeep_TP" <pr*******@discussions.microsoft.com> wrote in message
news:F4**********************************@microsof t.com... Hello John,

I have also faced exactly the same problem and I think I can help you here. In my case the web server had to serve only one web application. Robbe Morris is correct when he said that the application is recycling. I solved the
problem by contacting microsoft engineers. Here is how i resolved the probem.
First of all the problem is caused due to application recycling. aspnet_wp
gets recycled when any of the appdomains crash due to many reason. In my case the appdomain was crashing due to a function which got into a recurse. Due to this the stack overflowed and it crashed the appdomain. THis in turn caused the worker process (aspnet_wp.exe) to also recycle.

I wanted to find more information on why this is happening and found some
help from internet and thread postings here. I came to know that if any of
the appdomain in the worker process crashes, then the worker process will
recycle and along with it all other appdomains will also 'die'. that means if you have 5 appdomain for each web app and if one appdomain crashes then all the 4 appdomain will also cease to exist because the worker process will
recycle.

Now the question is how you will find out the cause of the recycle. The
solution is microsoft debuggers. You need to download the debuggers that will create a dump at the time of crashing. You wil get the exact cause of crash from the dump files. Hope this helps you !!

cheers
pradeep_tp

"Robbe Morris [C# MVP]" wrote:
Your application is recycling. If you are using InProc and you
are not in a web farm, this is the mostly like reason why.

Switch to StateServer and see if the problem persists.
--
Robbe Morris - 2004/2005 Microsoft MVP C#
http://www.masterado.net

"John" <js************@ecclesdeletethiscollege.ac.uk> wrote in message
news:eg*************@TK2MSFTNGP10.phx.gbl...
I've started to get session loss on many of my web apps, after only a few minutes (the session lifespan is supposed to be 60 minutes). It occurs in several apps (all on same server), and started happening while I was on .NET1.1, and continues now I've moved to 2.0 (native 2.0 assemblies
compiled using VS2005, not the original VS2003 ones).

My session states are very light (most stuff is held in the db). There is plenty of available ram on the server (400Mb free or so), worker process is using about 180Mb. The event log shows nothing out of the ordinary
(worker recycles should be logged there, yeah?). The processors are not busy (the server runs about 5 apps, total of 20,000-40,000 pages per day, nothing heavy). Theres no heavy app-layer computation tying up the
thread-pool (anything taking more than 1 sec or so gets sent to it's own thread).

Can anyone suggest what the problem is?!??!!? It can't be app specific, since it's affecting several diff ones.

(system: Windows 2000 Server fully patched, SQL 2000 sp4, .NET2.0, C#
code-behind)

Thanks,

John


Nov 23 '05 #4

P: n/a
Thanks for the help (and thanks pradeep_tp too),

I'll try switching to stateserver. But why is this happening?? everything
seems to be behaving well, no long loops or activity tieing up the main
thread pool.

Also, I thought worker recycles were logged in the app log? No sign of that
happening.

John

"Robbe Morris [C# MVP]" <in**@eggheadcafe.com> wrote in message
news:%2***************@TK2MSFTNGP15.phx.gbl...
Your application is recycling. If you are using InProc and you
are not in a web farm, this is the mostly like reason why.

Switch to StateServer and see if the problem persists.
--
Robbe Morris - 2004/2005 Microsoft MVP C#
http://www.masterado.net

"John" <js************@ecclesdeletethiscollege.ac.uk> wrote in message
news:eg*************@TK2MSFTNGP10.phx.gbl...
I've started to get session loss on many of my web apps, after only a few
minutes (the session lifespan is supposed to be 60 minutes). It occurs in
several apps (all on same server), and started happening while I was on
.NET1.1, and continues now I've moved to 2.0 (native 2.0 assemblies
compiled using VS2005, not the original VS2003 ones).

My session states are very light (most stuff is held in the db). There is
plenty of available ram on the server (400Mb free or so), worker process
is using about 180Mb. The event log shows nothing out of the ordinary
(worker recycles should be logged there, yeah?). The processors are not
busy (the server runs about 5 apps, total of 20,000-40,000 pages per day,
nothing heavy). Theres no heavy app-layer computation tying up the
thread-pool (anything taking more than 1 sec or so gets sent to it's own
thread).

Can anyone suggest what the problem is?!??!!? It can't be app specific,
since it's affecting several diff ones.

(system: Windows 2000 Server fully patched, SQL 2000 sp4, .NET2.0, C#
code-behind)

Thanks,

John


Nov 23 '05 #5

P: n/a
Hi Alvin,

" ..You more than likely are running several applications
inside one appdomain..". It was interesting to hear that several
applications can run inside one appdomain. I do not know about IIS 6.0 but in
IIS 5.0 for each web application, separate appdomain is created. Check at
this web site for more info.

http://aspalliance.com/226

cheers!
pradeep_tp

"Alvin Bruney - ASP.NET MVP" wrote:
that means if
you have 5 appdomain for each web app and if one appdomain crashes then all
the 4 appdomain will also cease to exist because the worker process will
recycle.

Nope, not possible. You more than likely are running several applications
inside one appdomain. If you lose that appdomain, all your applications will
be destroyed. However, an appdomain crashing does not affect other app
domains. I'll preface this by saying this is only possible on IIS6. Lesser
versions of IIS do not run in this containment mode.

--
Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @ www.lulu.com/owc
Forth-coming VSTO.NET - Wrox/Wiley 2006
-------------------------------------------------------

"pradeep_TP" <pr*******@discussions.microsoft.com> wrote in message
news:F4**********************************@microsof t.com...
Hello John,

I have also faced exactly the same problem and I think I can help you

here.
In my case the web server had to serve only one web application. Robbe

Morris
is correct when he said that the application is recycling. I solved the
problem by contacting microsoft engineers. Here is how i resolved the

probem.

First of all the problem is caused due to application recycling. aspnet_wp
gets recycled when any of the appdomains crash due to many reason. In my

case
the appdomain was crashing due to a function which got into a recurse. Due

to
this the stack overflowed and it crashed the appdomain. THis in turn

caused
the worker process (aspnet_wp.exe) to also recycle.

I wanted to find more information on why this is happening and found some
help from internet and thread postings here. I came to know that if any of
the appdomain in the worker process crashes, then the worker process will
recycle and along with it all other appdomains will also 'die'. that means

if
you have 5 appdomain for each web app and if one appdomain crashes then

all
the 4 appdomain will also cease to exist because the worker process will
recycle.

Now the question is how you will find out the cause of the recycle. The
solution is microsoft debuggers. You need to download the debuggers that

will
create a dump at the time of crashing. You wil get the exact cause of

crash
from the dump files. Hope this helps you !!

cheers
pradeep_tp

"Robbe Morris [C# MVP]" wrote:
Your application is recycling. If you are using InProc and you
are not in a web farm, this is the mostly like reason why.

Switch to StateServer and see if the problem persists.
--
Robbe Morris - 2004/2005 Microsoft MVP C#
http://www.masterado.net

"John" <js************@ecclesdeletethiscollege.ac.uk> wrote in message
news:eg*************@TK2MSFTNGP10.phx.gbl...
> I've started to get session loss on many of my web apps, after only a few > minutes (the session lifespan is supposed to be 60 minutes). It occurs in > several apps (all on same server), and started happening while I was on > .NET1.1, and continues now I've moved to 2.0 (native 2.0 assemblies
> compiled using VS2005, not the original VS2003 ones).
>
> My session states are very light (most stuff is held in the db). There is > plenty of available ram on the server (400Mb free or so), worker process > is using about 180Mb. The event log shows nothing out of the ordinary
> (worker recycles should be logged there, yeah?). The processors are not > busy (the server runs about 5 apps, total of 20,000-40,000 pages per day, > nothing heavy). Theres no heavy app-layer computation tying up the
> thread-pool (anything taking more than 1 sec or so gets sent to it's own > thread).
>
> Can anyone suggest what the problem is?!??!!? It can't be app specific, > since it's affecting several diff ones.
>
> (system: Windows 2000 Server fully patched, SQL 2000 sp4, .NET2.0, C#
> code-behind)
>
> Thanks,
>
> John
>


Nov 23 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.