Session loss problem

J

John

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
 
R

Robbe Morris [C# MVP]

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.
 
G

Guest

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
 
A

Alvin Bruney - ASP.NET MVP

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
 
J

John

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
 
G

Guest

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 said:
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 said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,736
Latest member
AdolphBig6

Latest Threads

Top