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

Session loss problem

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
5 1497
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
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
> 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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: mbosco51 | last post by:
I know this is a common thread, but I seem to be losing session variables on my website. I read through everything I could find, including this link: http://aspfaq.com/show.asp?id=2157, but cannot...
4
by: John Wilcher | last post by:
Environment: Windows 2000 Server, IIS 5.0, ASP .Net Framework 1.1, VB .Net source code We are experiencing a condition that manifests itself as a loss of all session objects. Intermittently...
14
by: Michael Carr | last post by:
I have an intermittent problem that occurs on a very small number of browsers that access my website. The strange thing is this: my site works perfectly for 99.9% of browsers. The behavior...
4
by: Chris | last post by:
When a request comes into a page on my ASP.net site and a session is not found, I want to detect whether the request is an initial request or if the user did have a session going that has now been...
7
by: Chris | last post by:
I'm on a project where the prevoius developer wrote code like below. I thought stuff like this was bad? Isn't he putting a page into a session object? And what we are trying to do is hit the db via...
8
by: Tim W. | last post by:
Chaps. We are working with SQL-Server based Sessions in the following environemtn: Win-Server 2K3 incl. IIS, Dot Net Framework 1.1, SQL2K SP3a, German. We are defining a Session-Variable...
4
by: leena13 | last post by:
Hi, I am facing a problem of loss of session variables once the ASP.Net 2.0 application is deployed. Let me add that this is actually a 1.1 to 2.0 migration. I found that the first time the...
14
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....
3
by: Martin Kulov [MVP] | last post by:
Hi, I am wondering if this problem is still valid for ASP.NET 2.0. "To maintain session state across different Web servers in the Web farm, the application path of the Web site (for example,...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.