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

Lost sessions issue

Hi,

We're experiencing random user sessions losses on our web applications,
and are researching for any useful information which may shed light on
this problem.
Environment:
In our company, we're developing a web product based on ASP.NET 2.0, in
conjunction with Oracle database over ADO.NET and external COM objects
running on the server, interacting with the database, and with external
modules.
Our servers are Windows Server 2003, running IIS 6.0, with all the
latest patches and updates provided by Microsoft. Web application on
the server is a precompiled version of our web solution.
Users:
Number of users on the system is currently minor, less than 10
concurrent users.
Sessions:
We use ASP.NET infrastructure for saving data into session variables.
Our sessionState mode is InProc, and our application sometimes loads
our sessions with heavy information variables (e.g. grids, DataSets
etc).
The problem:
This problem is completely inconsistent, and has no specific scenario
steps. Randomly, our sessions disappear.
HttpContext.Current.Session.IsNewSession becomes true, and all session
variables are lost. The Session Id is sometimes reset and replaced, and
sometimes left unchanged.
We know for sure that this is not a session time-out issue, as sessions
are lost while they're active. Sometimes users lose their sessions
right after logging in, and sometimes after a while of using the
system, sometimes they're not lost at all.

Our system has a handler for such failure (namely, directing the user
to the main login page, in order to start a new session), but we need
to research and find the root cause of this problem.
The failure occurs on random pages, and in random scenarios. Repeating
a scenario after a failure usually yields successful results (i.e. the
failure does not repeat itself).

Research:
This gives us the impression that the problem is probably IIS internal,
and/or depends on very specific status, or a fault in one of our
modules. We do not know of any specific memory leaks in our product.
We are not sure that this is an unhandled exception issue, which can be
resolved by HttpContext.Current.ClearError. Any information about this
topic would be appreciated as well.
Also, it's quite unlikely that those session losses are caused by
configuration files changes, or by changes to the
environment/recompilation of ASPX files.

Are there ways to monitor IIS in order to get a better idea about its
session handling?
Is there a way to follow a session and know what caused its closure?
Any hint would be highly appreciated.

Thank you,
Alon.

Sep 20 '06 #1
3 1385
Thus wrote alonr,
Hi,

We're experiencing random user sessions losses on our web
applications, and are researching for any useful information which may
shed light on this problem.
[...]
We are not sure that this is an unhandled exception issue, which can
be
resolved by HttpContext.Current.ClearError. Any information about this
topic would be appreciated as well.
Also, it's quite unlikely that those session losses are caused by
configuration files changes, or by changes to the
environment/recompilation of ASPX files.
Are there ways to monitor IIS in order to get a better idea about its
session handling?
Is there a way to follow a session and know what caused its closure?
Any hint would be highly appreciated.
It could be an unhandled exception in a background thread. See http://support.microsoft.com/?id=911816
helps.

And just to be sure that the worker process doesn't get bounced, monitor
the total items in Cache using Perfmon. Maybe you have a certain use case
where you're caching a super sized object graph in session state (which ends
up being a Cache entry at the end of the day).

Cheers,
--
Joerg Jooss
ne********@joergjooss.de
Sep 20 '06 #2
AlonR wrote:
We're experiencing random user sessions losses on our web
applications, and are researching for any useful information which
may shed light on this problem.
Try using sessionState mode="StateServer" in conjunction with the ASP.NET
State Service service.

Do you have the Web Garden setting (in application pools) at more than one?
That would cause it, because successive requests may go to different
instances which can know nothing about each other unless the state is stored
out-of-process.

Andrew
Sep 20 '06 #3
Two possible solutions:

Ask your web host to increase the Virtual memory limit on their application
pools. I had a similar problem and that solved it.

Recompilations are triggered by changes to the contents of the
application's \bin folder and hence a lost of session. Do you have a file
in the bin folder than is changing?
"AlonR" <al********@hotmail.comwrote in message
news:11**********************@b28g2000cwb.googlegr oups.com...
Hi,

We're experiencing random user sessions losses on our web applications,
and are researching for any useful information which may shed light on
this problem.
Environment:
In our company, we're developing a web product based on ASP.NET 2.0, in
conjunction with Oracle database over ADO.NET and external COM objects
running on the server, interacting with the database, and with external
modules.
Our servers are Windows Server 2003, running IIS 6.0, with all the
latest patches and updates provided by Microsoft. Web application on
the server is a precompiled version of our web solution.
Users:
Number of users on the system is currently minor, less than 10
concurrent users.
Sessions:
We use ASP.NET infrastructure for saving data into session variables.
Our sessionState mode is InProc, and our application sometimes loads
our sessions with heavy information variables (e.g. grids, DataSets
etc).
The problem:
This problem is completely inconsistent, and has no specific scenario
steps. Randomly, our sessions disappear.
HttpContext.Current.Session.IsNewSession becomes true, and all session
variables are lost. The Session Id is sometimes reset and replaced, and
sometimes left unchanged.
We know for sure that this is not a session time-out issue, as sessions
are lost while they're active. Sometimes users lose their sessions
right after logging in, and sometimes after a while of using the
system, sometimes they're not lost at all.

Our system has a handler for such failure (namely, directing the user
to the main login page, in order to start a new session), but we need
to research and find the root cause of this problem.
The failure occurs on random pages, and in random scenarios. Repeating
a scenario after a failure usually yields successful results (i.e. the
failure does not repeat itself).

Research:
This gives us the impression that the problem is probably IIS internal,
and/or depends on very specific status, or a fault in one of our
modules. We do not know of any specific memory leaks in our product.
We are not sure that this is an unhandled exception issue, which can be
resolved by HttpContext.Current.ClearError. Any information about this
topic would be appreciated as well.
Also, it's quite unlikely that those session losses are caused by
configuration files changes, or by changes to the
environment/recompilation of ASPX files.

Are there ways to monitor IIS in order to get a better idea about its
session handling?
Is there a way to follow a session and know what caused its closure?
Any hint would be highly appreciated.

Thank you,
Alon.

Sep 23 '06 #4

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

Similar topics

13
by: jing_li | last post by:
Hi, you all, I am a newbee for php and I need your help. One of my coworker and I are both developing a webpage for our project using php. We have a copy of the same files in different location...
3
by: Grinninger | last post by:
Hello, I am using ASP.NET, C# under W2K. I try to keep some important information in application- and session-state Objects. With the recycling of the ASPNet_WP.EXE my application- and...
8
by: Ron Vecchi | last post by:
I know this has been asked before but I out of all the posts I've read regarding using Directory.Move and then the application restarting itself I have found no answer except that Sessions are...
10
by: Anthony Williams | last post by:
Hi gang, This one looks like a bug :o( As you may or may not know, setting session management in web.config to use cookieless sessions causes the ASP.NET runtime to munge a session ID into...
12
by: D. Shane Fowlkes | last post by:
This is a repost (pasted below). Since my original post, I've double checked the system clock and set all IIS Session Timeout values to 10 minutes. Still ...the problem occurs. I've also...
6
by: Daniel Walzenbach | last post by:
Hi, I have a web application which sometimes throws an “out of memory” exception. To get an idea what happens I traced some values using performance monitor and got the following values (for...
9
by: AndersBj | last post by:
Hi all, I have a web application that uses State Server for session handling. The web application randomly loses all session variables. The sessions are not always lost, sometimes I can use the...
2
by: alex.callea | last post by:
Hi there, We have an asp.net (1.0) web application running on a 6 nodes web farm (Network Load balancing windows 2003 iis 6.0) using a sql state server (SQL 2000 running on windows 2003). ...
3
by: AlonR | last post by:
Hi, We're experiencing random user sessions losses on our web applications, and are researching for any useful information which may shed light on this problem. Environment: In our...
10
by: joeriggs | last post by:
Having trouble with an application which is using SQL Server 2000 to store session state. The App is ASP.NET 2.0 on Win2003. Occasionally all sessions are lost at once, causing the app to break....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, youll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shllpp 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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...

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.